Here is the code I have inside of the part.
local player = game.Players.LocalPlayer
local storage = game:GetService("ServerStorage")
local gui = storage:WaitForChild("HomeGui")
workspace:FindFirstChild("House1"):FindFirstChild("Doors"):FindFirstChild("Door1").Touched:connect(function(hit)
if hit.Parent.Humanoid then
gui:FindFirstChild("House1"):Clone().Parent = player:WaitForChild("PlayerGui")
workspace:FindFirstChild("House1"):FindFirstChild("Doors"):FindFirstChild("Door1"):FindFirstChild("Script").Disabled = true
end
end)
And the error is: 17:47:59.182 - Workspace.House1.Doors.Door1.Script:7: attempt to index upvalue 'player' (a nil value)

1 comment
So I see it is "player = game.Players.LocalPlayer" If it's a ServerScript, that won't work. Also, if it is a LocalScript, you might need to edit it.