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

Why does the GUI not pop up when I walk on the brick?

Asked by 6 years ago
Edited 6 years ago

local Part = script.Parent

Part.Touched:connect(function(HIT)

local H = HIT.Parent:FindFirstChild("Humanoid")

if H then

local Player = game.Players:GetPlayerFromCharacter(HIT.Parent)

Player.PlayerGui.ScreenGui.Frame.Visible = true

end end)

Trying to make a GUI pop up when I walk on a brick. Seems to have no errors yet it does not work.

0
Make sure that the ScreenGui is enabled Kiriyato 15 — 6y
0
Please also use the Lua code block. xXRobloxRobloxianXx 15 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Hmmm...if you want to make a GUI pop up, try this:

function AppearGui()
    for _,c in pairs(game.Players:GetPlayers()) do
        c.PlayerGui.ScreenGui.Frame.Visible = true
    end
end
script.Parent.Touched:connect(AppearGui)

It should be quite that simple, really.

Ad

Answer this question