Hover Car Controls issue

So I’m making hovercar and I have done my suspension system which works really well, unless you jump on it and try to drive it.

Once you jump on it and sit on VehicleSeat, it starts doing this.

https://gyazo.com/0f3463b0ffe1cf2850b5bfd57676b80c

it starts movements resulting it, looking like particular solution in this article.
This shouldn’t be happening, because once player sits on the vehicle seat, I am manually adding all masses of characters parts to Mass Number value, which suspension script reads every render step.

It feels like no matter what kind of force suspension applies something pushes it down.
https://gyazo.com/027a02e664b8716ceb0af23586d77aa1

I will not post codes here, instead I will link them to anyone willing to help
If you need any further information or scripts I will provide them to you.

1 Like

I suggest you to post your code here. We are only gonna help faster if we can directly access the code. If you are the one who needs help, do some effort. :wink:

Regards,
Jonas

3 Likes

But I don’t know what script you need. I have 4 scripts, one is for suspension, one is for friction, one is for assigning network(i think this is the one that could be responsible) and one is for mass(when player sits it adds mass to number value)

local Seat = script.Parent
		
local players = game:GetService("Players")
Seat.Changed:Connect(function(prop)
	if prop == "Occupant" then
		local humanoid = Seat.Occupant
		
			
		if humanoid then
			local player = players:GetPlayerFromCharacter(Seat.Occupant.Parent)
			
			if player then
				Seat:SetNetworkOwner(player)
				game:GetService("ReplicatedStorage").SuspensionRemote:FireClient(player, script.Parent.Parent.Parent)
				game:GetService("ReplicatedStorage").ControllRemote:FireClient(player, script.Parent)
			end
		else
			Seat:SetNetworkOwnershipAuto()
			
		end
	end
	
end)

You should probably send the suspension script, or make a place file with the ‘car’ in it.

I found out what has caused the Issue

My suspension script is server script, So when I Set Player as Network Owner, My suspension script gets unsynchronized with Network, because everything happens inside RunService

game:GetService('RunService').Stepped:Connect(function()

end)

I’m setting player as network owner because Vehicle Control script should be Local, otherwise it will have latency. I don’t know what to do, any suggestions

Have you tried doing suspencion on the client as well?
When a player is network owner over something I think it’s best to do all the calculations on the client.
It will optimize the server a bit as well.

If I do that will other clients be able to see it? Where should I place Local script? I am currently cloning and childing it to vehicle

Other players could just see the vehicle hovering.
Local scripts must always be pareneted inside PlayerGui, Backpack or the Character to work.