Car "Jitters" until player sits in it

I’m currently working on a basic car system for a game.

My issue is this: Whenever a new instance of the car is generated, it tends to “jitter”, causing it to move to a offset position. This “jitter” is only corrected after a player has enter the car.

Video Ref:

I haven’t tried much, but I don’t know where to start.

1 Like

In my opinion, this might be caused by clipping parts. If the car was inside of the baseplate a little bit, it could cause it to jitter around.

If this happened to me, I would probably solve it by making it so that the car would be anchored if there was no player in it.

1 Like

Might be this: Network Ownership | Documentation - Roblox Creator Hub

There’s already a specific example which works perfect for you:

local Players = game:GetService("Players")

local vehicleSeat = script.Parent

vehicleSeat.Changed:Connect(function(prop)
	if prop == "Occupant" then
		local humanoid = vehicleSeat.Occupant
		if humanoid then
			-- Get the player from the character
			local player = Players:GetPlayerFromCharacter(humanoid.Parent)
			if player then
				vehicleSeat:SetNetworkOwner(player)
			end
		else
			-- Reset ownership when seat is unoccupied
			vehicleSeat:SetNetworkOwnershipAuto()
		end
	end
end)

If it isn’t the network owner maybe check if your vehicle script changes anything.

1 Like

You could maybe could use collisiongroups with this?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.