I have a script in a part that is supposed to make it so when any player touches the part it will show the person who touched the part a Gui.
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.finish gui.Frame.Visible = true
end
end)

2 comments
server scripts can't access guis from players unless it clones one and gives it to the player
line 7: Player.PlayerGui["finish gui"].Frame.Visible = true