How can I fix this bug when 2 players join the game, the karts go all whack?

Hello developers! I hope you are all having a great day! There is this bug when you join the game with 2 players, the karts move weirdly, and the player doesn’t sit in the kart.


Images:

2+ players joining the game:

Only 1 player joining the game:


:white_check_mark:Works fine!


The script:

local count = 0
local debounce = false
game.Players.PlayerAdded:Connect(function(plr)
    repeat wait() until debounce == false
    debounce = true
    print(count)
    count += 1
    local cl = script:FindFirstChild("Plr1"):Clone()
    cl.Name = "Plr"..count
    cl.Parent = workspace:WaitForChild("Map"):WaitForChild("Players")
    cl:SetPrimaryPartCFrame(workspace:WaitForChild("Map"):WaitForChild("KartSpawnAreas"):FindFirstChild(count).CFrame)
    wait(1)
    cl.DriveSeat:Sit(plr.Character.Humanoid)
    debounce = false
end)

If you can help, please let me know. Thanks, WE

1 Like

Could you record a video of the 2 players issue?


There you go!

Sorry it took me a while to respond. I was doing homework.

2 Likes