Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't a players teleport in server but it works in studio?

I've already looked up why things work in studio but doesn't work in server, I couldn't find anything, please help, thank you.

Heres the script:

function MovePlayers()
	local Spawnso = game.Workspace.Map.Spawns:GetChildren()
	
	for i, v in pairs(game.Players:GetPlayers()) do
		local ToSpawn = math.random(1, #Spawnso)
		if v.PlayerGui:WaitForChild("PlayerScreenGui").BackgroundFrame.MessageFrame.TextFrame.Frame.TextButton.WhatColor.Value == "Green" then
			wait()
		v.Character.HumanoidRootPart.CFrame = Spawnso[ToSpawn].CFrame * CFrame.new(0, 5, 0)
		-- the last part is probably not needed but oh well
		wait()
		end
	end
end

1 comment

0

because roblox thinks the script is fake and something went wrong in the creation of the script

1 answer

it is because roblox says it is a incorrect script so it dose not register the script if it was written incorrectly something probely went wrong in the writing of the script

2 comments

0

Very misspelled, but correct

0

What do I do?

This discussion is preserved as it was. New answers, comments, and votes are closed.