if mouse.Target ~= nil then it continues yet sometimes even when mouse.Target == nil it's still continuing, resulting me with this output
14:13:47.457 - Players.Player1.PlayerGui.ScreenGui.LocalScript:8: attempt to index field 'Target' (a nil value) 14:13:47.458 - Stack Begin 14:13:47.460 - Script 'Players.Player1.PlayerGui.ScreenGui.LocalScript', Line 8 14:13:47.461 - Stack End
14:13:48.553 - Players.Player1.PlayerGui.ScreenGui.LocalScript:11: attempt to index field 'Target' (a nil value) 14:13:48.554 - Stack Begin 14:13:48.555 - Script 'Players.Player1.PlayerGui.ScreenGui.LocalScript', Line 11 14:13:48.556 - Stack End
This is ONLY occuring in Studio!
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
--Labelling of the objects
game:GetService('RunService').RenderStepped:connect(function()
local Sign = script.Parent.TextLabel
if mouse.Target ~= nil then
if mouse.Target.Name == "Stuff" then
Sign.Position = UDim2.new(0,mouse.X+16,0,mouse.Y)
Sign.Visible = true
Sign.Text = mouse.Target.Parent.Name
else
Sign.Visible = false
end
else
Sign.Visible = false
end
end)

2 comments
is this in a local script in a storage that replicates over every client?
It is in a local script in the starter gui, works perfect in play mode, even in studio but in studio sometimes it gives the error (still works)