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

how do I make a gui appear when i touch a block?

Asked by 5 years ago

how do I make a gui appear when i touch a block? - I have tried and looked everywhere and the gui is fully ready.

2 answers

Log in to vote
0
Answered by 5 years ago
1local part = script.Parent
2local gui = game.StarterGui.GUI
3 
4part.Touched:Connect(function(hit)
5    if hit.Parent:FindFirstChild("Humanoid") then
6    gui.Visible = true
7end)

Try This

0
thanks they both worked NameNuH9012 2 — 5y
Ad
Log in to vote
0
Answered by
DesertusX 435 Moderation Voter
5 years ago

Put a Local Script in the Part.

1local part = script.Parent
2local gui = game.StarterGui.GUI --Make this the name of your GUI and where it is located.
3 
4part.Touched:Connect(function()
5    gui.Visible = true --Make sure the GUI.Visible is set to false.
6 
7end)

My sincere apologies if this does now work. :)

0
not* DesertusX 435 — 5y
0
thanks they both worked NameNuH9012 2 — 5y
0
np DesertusX 435 — 5y

Answer this question