i will give acces to you for game please wait some seconds
I unfortunately can’t help you directly, I don’t have a pc with me at the moment
okay, at KeyHandler change the localplayer line for this:
local mouse = game.Players:GetPlayerFromCharacter(script.Parent.Occupant.Parent):GetMouse()
then see if it works
To go along with the suggestions the others have had about your script, it may be something called gimbal lock.
This happens when you rotate a CFrame by 90 degrees causing 2 of the axes to align and flip your values.
Type in ‘gimbal lock’ using the Search bar up top and you’ll see a few posts and solutions about this issue.
just saying, the cframe was wrong at first because it was directed at a vector3 he made from using a vector2, which was storing the mouse position on the screen, not in the world, which you can take notice of by seeing how the vehicle only seemed to want to point at the spawnpoint, which I believe is the origin (0,0,0)
Yes, but my addition refers to an issue they may get when the world position issue gets fixed. I’ve seen the issue posted about here many times so I was trying to get them more information that may help if it happens.
You are incorrectly using RemoteEvent
s and Vector3
s.
Change
to
script.Parent.MouseLocation.OnServerEvent:Connect(function(player, mousePosition)
and change
to
script.Parent.Parent.Base.CFrame = CFrame.new(script.Parent.Parent.Base.Position, mousePosition)
I think the issue might be that the local script is inside the vehicle model, meaning the mouse can’t be found