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

What is the script so you can open a GUI by touching a brick?

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.

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.