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

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

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!

2 comments

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

0

Well I had the idea that you had to put a part around it however I though it wasnt as simple as that!

1 answer

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!

1 comment

This discussion is preserved as it was. New answers, comments, and votes are closed.