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 4 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 4 years ago
local part = script.Parent
local gui = game.StarterGui.GUI

part.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then 
    gui.Visible = true
end)

Try This

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

Put a Local Script in the Part.

local part = script.Parent
local gui = game.StarterGui.GUI --Make this the name of your GUI and where it is located.

part.Touched:Connect(function()
    gui.Visible = true --Make sure the GUI.Visible is set to false.

end)

My sincere apologies if this does now work. :)

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

Answer this question