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

how can i make a gui appear on my screen when i touch a brick?

-------< variables >--------
local part = script.Parent
local p = game:GetService("Players")
local gui = p.PlayerGui.Shop.ShopFrame
-------< code >-------------
part.Touched:Connect(function(hit)
	if gui.Visible ==  false then
		gui.Visible = true
	end
end)

the error says that player gui is not a valid member of player (p in my case) any help?

2 comments

0

You need to take a look into Remote Events/Functions https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events

0

While your at it, you may want to read over this to get a better understanding of how the client and server differ https://developer.roblox.com/en-us/articles/Roblox-Client-Server-Model

1 answer

✓ Accepted answer

Clone the GUI to playergui on touched.

well, thats what i do anyway

1 comment

0

thanks

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