✓ Accepted answer
The problem with this script is that you are attempting to do two things at once. Not only do you want your script to be a LocalScript (so you can use game.Players.LocalPlayer) but you also seem to want to have it as the child of a brick. The problem is that you will need to have this as a Script, saying something along these lines (pardon my anonymous function):
script.Parent.Touched:connect(function(part)
if not part.Parent:FindFirstChild("Humanoid") then return end
for _,v in pairs(game.Players:GetChildren()) do
if v.Character == part.Parent then
if v:FindFirstChild("PlayerGui") and not v.PlayerGui:FindFirstChild("GUI") then
local gui = script.Parent.GUI:Clone()
gui.Parent = v.PlayerGui
end
break
end
end
end)
Here is what your userdata in Workspace should look like if you choose to use the method above.
http://prntscr.com/8t2ebu
The reason your script didn't run is because LocalScripts do not run unless they are the descendant of an active player's character model, the Backpack of the player, or the PlayerGui.
With this method, you can still run a localscript, but this way it will actually work since once it becomes the descendant of a PlayerGui, it will activate for that specific player. Hope this helped, and if it did don't forget to upvote!