game:GetService("RunService").RenderStepped:Connect(function() local Target = Mouse.Target or nil if Target.Name == "Hitbox" then local SelectedItem = Target.Parent local TargetUI = script.Parent.Hovering if SelectedItem.Information:FindFirstChild("Enabled") and SelectedItem.Parent.Parent.TycoonOwner.Value == Player.Name then TargetUI.Visible = false TargetUI = script.Parent.HoveringMine else script.Parent.HoveringMine.Visible = false end TargetUI.Position = UDim2.new(0, Mouse.X + 20, 0, Mouse.Y + 8) TargetUI.ItemName.Text = SelectedItem.Name TargetUI.ItemLevel.Text = "Level " .. game.Players[SelectedItem.Parent.Parent.TycoonOwner.Value].SaveStats[SelectedItem.Name].Value if TargetUI.Name == "HoveringMine" then UpdateToggle(SelectedItem) end TargetUI.Visible = true else Mouse.TargetFilter = Target script.Parent.HoveringMine.Visible = false script.Parent.Hovering.Visible = false end end)
Players.Hexorium.PlayerGui.Interface.ClientHandler:285: attempt to index local 'Target' (a nil value)
^ error
The line in question is line 3 on the code block above. Any reason why this error occurs?
smh, why do u even bother ????
local Target = Mouse.Target or nil....
whats Mouse
, show that please...
"OR NIL" now if you have "nil" normally no one checks for its name??
Target.Name
of course its gonna error if "Target" is nil...