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)
ch0kehold is nearly correct. If you have a space in the instance's .Name, you need to access it like this:
--////Assuming that you're trying to access a Frame that is inside an object named 'Finish GUI' --//You don't need to assign script.Parent to a variable, as you only use it once --local Part = script.Parent --//script.Parent.Touched is the same as Part.Touched, but without the wasted variable script.Parent.Touched:connect(function(HIT) local h = HIT.Parent:FindFirstChild("Humanoid") if h then local Player = game.Players:GetPlayerFromCharacter(HIT.Parent) --You put the object name inside square brackets, as a string Player.PlayerGui['Finish GUI'].Frame.Visible = true end
// thats the line where i think your error is:
Player.PlayerGui.finish gu.Frame.Visible = true
// replace it with that:
Player.PlayerGui.["finish gui"].Frame.Visible = true