--Interact Script local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() local cam = game.Workspace.CurrentCamera local deb = false local door = game.Workspace.Door.Model.door while true do wait() if mouse.Target:FindFirstChild("canInteract") then if deb == false then deb = true script.Parent.Background.Visible = true mouse.KeyDown:connect(function(Key) if Key == "e" then if mouse.Target.canInteract.Value == "door" then door.Script.Disabled = false wait(4) door.Script.Disabled = true end end end) wait() deb = false end else if deb == false then deb = true script.Parent.Background.Visible = false wait() deb = false end end end
Error:Players.Player.PlayerGui.Interact.interactScript:12: attempt to index field 'Target' (a nil value)
Help anyone? This is a door interaction script. Everything works but it keeps saying the target is a nil value. Target is the door