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

How Fix My Teleport Gui That Shows When A Player Touch A Part?

Hi, I need help on this, Anyone said me that i need to remove Debounce and follow her tips for fix my Teleport Gui doesn't show when a player touch a part from the previous questions. But i don't know how to do. I'm not a scripter i only find things with scripts already in for use in Mermaid High. But I specialize in basic buildings!

Image: https://gyazo.com/02e250aad414d99c5c354d1b54a10be4

Previous Question: https://scriptinghelpers.org/questions/129309/how-to-make-a-teleporter-gui-that-show-when-a-player-touch-a-part

3 answers

✓ Accepted answer

First, make a RemoteEvent in ReplicatedStorage and name it OpenGUI

Now create a Script inside the part:

script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
game.ReplicatedStorage.OpenGUI:FireEvent(plr)
end)

Then create a LocalScript inside your FrameGUI:

game.ReplicatedStorage.OpenGUI.OnClientEvent:Connect(function()
script.Parent.Visible = true
end)

you want the teleporter to appear for the player as soon as the player plays right well if so:

Local player = game:GetService("Players").LocalPlayer
Local teleportGUI = workspace.YOUR TOUCH PART GO HERE

teleportGUI.Touched:Connect(Function(hit)
 if hit.Parent == Player.Character then
Script.Parent.YOURGUINAME.Frame.Visible = true
End
End)

and to close the gui just put a close button on the Frame

2 comments

0

Is Script Local right?

0

Those scripts doesn't work -_-

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