Hello all! I have built a lift in my roblox game, and it works so that when you walk in you get teleported to a lift somewhere else, and I also would like it to bring up a GUI at the same time (I’ve tried that but there always seems to be a delay). The only problem is, when someone teleports, theres a chance of them getting spawned ontop of the elavator. If anyone could help me fix this, and my popup gui upon touch, that would be fab!
My Teleport Script:
local Teleport = "Part2"
function Touch(hit)
if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(Teleport).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(Teleport).Locked = true
local Pos = script.Parent.Parent:findFirstChild(Teleport)
hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end
script.Parent.Touched:connect(Touch)
If someone could also help to incorporate something that makes a gui popup, that would be greatly appreciated!