How do I add a weapon to car?

I am making a racing game and I don't know how to add a working gun to the vehicles, so I just wanna ask how you add the gun. if you wanna make the game with me you can

The standard guns are fired via their Shoot ability (abilities look like a hand in the hierarchy). The player becomes the owner of this ability when they equip the gun. If you attach the gun to the car then you will have to add some code to the car to make the player the owner when they get in the car.

A trivial example might look like this:

local shootAbility = script:GetCustomProperty("ShootAbility"):WaitForObject()
local enterTrigger = script:GetCustomProperty("EnterTrigger"):WaitForObject()

function OnInteracted(_, player)
    shootAbility.owner = player


You will need to develop this to make sure the player is still in the vehicle (that example just leaves them the owner forever) and sort out the animation, aiming and gun behaviour.

You should also be careful to test your game in a full served / multiplayer environment as I have heard that the Core cars are not very robust and cannot be driven at high speed in an actual game environment. You can do this by publishing your game (select the "unlisted" option to prevent it from becoming publicly searchable).

I don't have time to develop a fully functional, game ready solution. But you can always chat to others for ideas and collaboration on the discord channel.