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
4 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 — 4y
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 — 4y

1 answer

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

Clone the GUI to playergui on touched.

well, thats what i do anyway

0
thanks seikkatsu 110 — 4y
Ad

Answer this question