This script is supposed to teleport a player to an object when it touches a part, which works, but then it is supposed to enable a gui, which doesnt work.
teleGui = game.StarterGui.Teleport
game.StarterGui.Teleport.Enabled = false
function touchTele()
local Brick = script.Parent
AnotherBrick = game.Workspace.oiSpawn.SpawnLocation
Brick.Touched:connect(function(part)
if part.Parent.Humanoid then
part.Parent:MoveTo(AnotherBrick.Position)
end
end)
end
function turnOn()
teleGui.Enabled=true
end
script.Parent.Touched:connect(touchTele)
script.Parent.Touched:connect(turnOn)

1 comment
Thanks! It worked perfectly.