seat:Sit(humanoid) doesnt work sometimes

help the using :Sit(humanoid) doesnt always work cuz when doing seems that it breaks the car, this happens when there are at least 2 players and mostly affects the players that arent sitted to the car firstly. help!!!

script for sitting players

function module:TeleportPlayers(starterPoints)
	
	self = module
	
	local maxNum = #self.playersOnGame
	
	for index, playerOnGame in pairs(self.playersOnGame) do
		
		local clone = game.ReplicatedStorage.Cosmetics.Cars.CarSkins:FindFirstChild(InventoryModule:GetPlayerInventory(playerOnGame).SelectedCarSkins):Clone()
		clone.Parent = workspace
		
		
		clone.Station.Jeep.Chassis.CFrame = starterPoints:FindFirstChild(index).CFrame
		clone.Station.Jeep.DriveSeat:Sit(playerOnGame.Character.Humanoid)
		task.wait(1)
		clone.Station.Jeep.Chassis.Anchored = true
		local randomNum = math.random(1,maxNum)
		--playerOnGame.Character.HumanoidRootPart.CFrame = starterPoints:FindFirstChild(index).CFrame
		
	end
	
end

script when all players are ready:

			for index, playerOnGame in pairs(playersOnGame:GetPlayers()) do
				
				if playerOnGame and playerOnGame.Character.Humanoid.SeatPart then
					playerOnGame.Character.Humanoid.SeatPart.Parent.Chassis.Anchored = false
				else
					table.remove(playersOnGame:GetPlayers(), table.find(playersOnGame:GetPlayers(),playerOnGame))
				end
				
			end

before, players would manually sit on a car but when i started using :Sit() its bringing problems and breaking the game

2 Likes