-- In a server script inside ServerScriptService. local players = game:GetService("Players") -- Players service local seat = workspace:WaitForChild("MainSeat") players.PlayerAdded:Connect(function(plr) local char = plr.Character or plr.CharacterAdded:Wait() local hum = char:FindFirstChildOfClass("Humanoid") -- The Humanoid seat:Sit(hum); end)
That is the code I used that someone helped me write. it's supposed to make a player sit down when they join but I get this error please help me fix this and anymore errors you can spot thanks :)
Try adding a wait() and see if it fixes it.
-- In a server script inside ServerScriptService. local players = game:GetService("Players") -- Players service local seat = workspace:WaitForChild("MainSeat") players.PlayerAdded:Connect(function(plr) local char = plr.Character or plr.CharacterAdded:Wait() local hum = char:FindFirstChildOfClass("Humanoid") -- The Humanoid wait(0.5) seat:Sit(hum); end)