This teleport GUI I made for my upcoming game, Blox Wars only works in studio? EVERYTHING is local??
EDIT: Still not fixed! Here is the new script I tried to make, only works in studio too:
--Made by club101coolguy
Player = game.Players.LocalPlayer
TehSpawn = game.Workspace.SpawnLocation2
BlackScreen = script.Parent.BlackScreen2
TeleportButton = script.Parent.TeleportButton2
function TeleportPlayer()
BlackScreen.Transparency = 1
wait(0.1)
BlackScreen.Transparency = 0.9
wait(0.1)
BlackScreen.Transparency = 0.8
wait(0.1)
BlackScreen.Transparency = 0.7
wait(0.1)
BlackScreen.Transparency = 0.6
wait(0.1)
BlackScreen.Transparency = 0.5
wait(0.1)
BlackScreen.Transparency = 0.4
wait(0.1)
BlackScreen.Transparency = 0.3
wait(0.1)
BlackScreen.Transparency = 0.2
wait(0.1)
BlackScreen.Transparency = 0.1
wait(0.1)
BlackScreen.Transparency = 0
wait(0.1)
game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(2630, 19.9, 1601))
wait(0.1)
BlackScreen.Transparency = 0
wait(0.1)
BlackScreen.Transparency = 0.1
wait(0.1)
BlackScreen.Transparency = 0.2
wait(0.1)
BlackScreen.Transparency = 0.3
wait(0.1)
BlackScreen.Transparency = 0.4
wait(0.1)
BlackScreen.Transparency = 0.5
wait(0.1)
BlackScreen.Transparency = 0.6
wait(0.1)
BlackScreen.Transparency = 0.7
wait(0.1)
BlackScreen.Transparency = 0.8
wait(0.1)
BlackScreen.Transparency = 0.9
wait(0.1)
BlackScreen.Transparency = 1
end
TeleportButton.MouseButton1Down:connect(TeleportPlayer)
Please help!

2 comments
Does the output give you an error if you press F9 in game?
Yes, the errors are: TeleportButton is not a valid member of ScreenGui, and BlackScreen2 is not a valid member of screen GUI? I was thinking I could do :WaitForChild in the variables.