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

Teleport GUI Only works in studio?[STILL NOT FIXED!]

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

0

Does the output give you an error if you press F9 in game?

0

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.

1 answer

Ok, Try this:

Instructions:

Put this script Under your "BlackScreen2" Frame

Instructions:

Put this script Under your "BlackScreen2" Frame

Make SpawnLocation2 a Part named SpawnLocation2 (if its a real SpawnLocation, remove it and replace it with a part that's invisible,cancollide set to false, and anchored --- Be Sure to Anchor it, and name it SpawnLocation2)

I tested this and it actually works!

--Made by club101coolguy

Player = game.Players.LocalPlayer
TehSpawn = game.Workspace.SpawnLocation2
BlackScreen = script.Parent
TeleportButton = script.Parent.TeleportButton2

function TeleportPlayer()
	TeleportButton.Visible = false
    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)
    Player.Character:MoveTo(TehSpawn.Position) 
    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.Visible = true
TeleportButton.MouseButton1Down:connect(TeleportPlayer)







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