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

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

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.

2 comments

0

Make sure that the ScreenGui is enabled

0

Please also use the Lua code block.

1 answer

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.

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