What is the script so you can open a GUI by touching a brick? I don't really know how to do it or type it at all.
✓ ANSWER ACCEPTED
What is the script so you can open a GUI by touching a brick?
1 answer
✓ Accepted answer
Put script in brick and gui in script.
script.Parent.Touched:connect(function(part)
gui = script.GuiNameHere:Clone() --Change GuiNameHere to name of Gui.
if part.Parent:FindFirstChild("Humanoid") then
playername = part.Parent.Name
if game.Players:FindFirstChild(playername) then
gui.Parent = game.Players[playername].PlayerGui
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
