Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Vid_eo 126
8 years ago

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!


0
Does the output give you an error if you press F9 in game? funyun 958 — 8y
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. Vid_eo 126 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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)







Ad

Answer this question