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 appear on my screen when i touch a brick?

Asked by
seikkatsu 110
5 years ago
-------< 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?

0
You need to take a look into Remote Events/Functions https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events ForeverBrown 356 — 5y
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 ForeverBrown 356 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

Clone the GUI to playergui on touched.

well, thats what i do anyway

0
thanks seikkatsu 110 — 5y
Ad

Answer this question