Reposted due to no answers being posted on my last post. So what this script is supposed to do is make a GUI pop up when a part is touched. It isn't working, why? Here is my script:
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)?

2 comments
Is there an error in the output?
Also, what script are you using?