So, I'm trying to make a game where it makes you bounce up and down and see who wins, but the script isn't enabling the LocalScript. Here are both scripts:
Original Script:
message = game.Workspace.Message while true do message.Text = "Starting new game..!" wait(5) message.Text = "" wait(5) message.Text = "Loading Map..." game.Lighting.Map:clone().Parent = Workspace wait(0.5) message.Text = "Building..." wait(0.5) message.Text = "Scripts enabling..." wait(0.5) message.Text = "Fixing..." wait(0.5) message.Text = "Spawning players..." wait(5) script.LocalScript.Disabled = false wait(3) script.LocalScript.Disabled = true end
LocalScript:
wait(0.1) game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(-11.8, 45.96, 12.8) wait(0) game.Players.LocalPlayer.Humanoid.Sit = true
Thank you!
LocalScripts only run when they are parented to a child of the player (Their character, PlayerGui, or Backpack). You must parent the LocalScript to a child of each player and then enable it.
EDIT Here's some code that may help you out:
for i,v in next,Game:GetService("Players"):GetPlayers() do --loops through every player local ls=script.LocalScript:Clone() --clones the local script ls.Parent=v:WaitForChild("PlayerGui") --parents the local script to the player's playergui ls.Disabled=false --enables the local script end
EDIT2 Humanoid is a child of Character, not Player (I've also made some parts more efficient)
repeat wait(0.1) until Game.Players.LocalPlayer.Character game.Players.LocalPlayer.Character:WaitForChild("Torso").CFrame = CFrame.new(-11.8, 45.96, 12.8) wait(0) game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Sit = true