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

My Portal TP ScreenGUI's Will Not Work At All, So I've Come Here?

Asked by
NSMascot 113
4 years ago
Edited 4 years ago

I have 2 portals that open a TP Gui when touched, there are two separate frames in aScreen Gui. They work-ish, when you go one it worked, but any time after that on any portal it doesn't work... here are my scripts They are global scripts (NOT LOCAL)!

function OnTouched(hit)
        game.Players[hit.Parent.Name].PlayerGui.PortalTeleports.SLTP.Visible = true
        hit.Parent.HumanoidRootPart.Anchored = true

end 

script.Parent.Touched:Connect(OnTouched)

function OnTouched(hit)
        game.Players[hit.Parent.Name].PlayerGui.PortalTeleports.MLTP.Visible = true
        hit.Parent.HumanoidRootPart.Anchored = true

end 

script.Parent.Touched:Connect(OnTouched)

SLTP = Shadowlands TP MLTP = Mainland TP

The two scripts are located in two differant parts, they each open a differant frame, located in the same ScreenGui, when you stand on one portal (dosnt matter which), it opens correct Gui, then if you click yes, then it would TP you to the other area. Then if you stand on the one on the other side, it dosn't work. When i re-enter Test Mode, I go to the other end and that works but then the other dosn't! Can Someone Please Help Me!!!!!!!!!!

0
Are there any errors in your output? If so, tell me them. Also, I would consider using RemoteEvents to make the GUI elements visible. Fireorius 51 — 4y
0
You need to put it in a localscript in starter gui as you need to contact it via client H_exadecimal 9 — 4y
0
use a local script User#28017 0 — 4y

Answer this question