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:
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