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

How can I make a GUI that pops up when you walk near a part?

Asked by 6 years ago

I understand how to make a gui completely via script however im scripting(tring to script) an NPC script! But i dont understand how I can make like a button that says "Press A" or something(I already have the gui part done so dont include that in your answer) Thanks for your answer! I'll say in advance that it really helps!

0
insert a script int othe screengui or frame and game.Workspace.Part.Touched:connect(function() script.Parent.Visible......... or make a invisible part around it and make it touched Lolamtic 63 — 6y
0
Well I had the idea that you had to put a part around it however I though it wasnt as simple as that! DreamSkyHigh 30 — 6y

1 answer

Log in to vote
0
Answered by
Viking359 161
6 years ago
Edited 6 years ago

Add a bigger, invisble part around the part. Add an onTouch script to that part. This is for if you want it to be made without having to press a button. If you want to learn how to use keys to activate it, go here.

script.Parent.Touched:Connect(function (hit)
if hit.Parent:FindFirstChild("Humanoid") then
local a = game.ServerStorage.gui:Clone()
a.Parent = hit.Parent.PlayerGui
end)--might need more ends

Make the gui by placing a screen gui inside starter gui, then add whatever you want in that, then put the screen gui inside serverstorage and name it gui. If you have any other questions, feel free to ask me!

Ad

Answer this question