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

Why does this script work in roblox studio but no in actual server?

Ive opened up the console and it says player is a nil value but it works in roblox studio help? My script only works in a script not local. Here it is

wait(1)

player = game.Players.LocalPlayer

button = script.Parent

local debounce = false

function teleport() if not debounce then

debounce = true
torso = player.Character.Torso
torso.CFrame = game.Workspace.plswork.CFrame

end

end

local allow = ( game.CreatorId == player.userId

) if allow then

m = Instance.new("Message", game.Workspace)

m.Text = "Welcome Admins"

wait(2)

m:Remove()

teleport()

end

1 comment

0

It would help if you had your code in a code block /:

1 answer

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