How could it work in studio but not online? [EDIT] What i am trying to accomplish already works, but only in roblox studio test mode, and not when i publish it to roblox! here is my script
wait(2)
repeat
wait(1)
if workspace:findFirstChild(script.Parent.Parent.Parent.Parent.Name) then
if script.Parent.Value == 1 and script.Parent.Parent.CamValue.Value == 1 then
Workspace.Player.Torso.CFrame = CFrame.new(Workspace.Spawners.WhiteSpawn.Position + Vector3.new(0, 2, 0))
elseif script.Parent.Value == 2 and script.Parent.Parent.CamValue.Value == 1 then
Workspace.Player.Torso.CFrame = CFrame.new(Workspace.Spawners.GraySpawn.Position + Vector3.new(0, 2, 0))
elseif script.Parent.Value == 3 and script.Parent.Parent.CamValue.Value == 1 then
Workspace.Player.Torso.CFrame = CFrame.new(Workspace.Spawners.BlackSpawn.Position + Vector3.new(0, 2, 0))
end
end
until script.Parent.Parent.CamValue.Value == 0
Please help!!! Thank you!!! P.S this is in starterGui so it will spawn whenever the character (re)spawns P.P.S this is in a localscript

3 comments
What are you trying to accomplish? This will only work ONCE for a player's character named "Player" and is un-efficient
That didn't work, but i did change from FindFirstChild("Player") to (script.Parent.Parent.Parent.Name)
yoga, I think the reason why your gettings these is because you are using LocalScripts.