Hello, devs!
So I was making thing like if you will move your mouse on part then it will change the cursor. It works, but it prints error on the output and It's annoying when you see error on output. (For me.)
CODE:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Move:Connect(function()
if mouse.Target.Name == "Part" then
mouse.Icon = "http://www.roblox.com/asset?id=4760454830"
else
mouse.Icon = ""
end
end)
ERRORS:
Workspace.ErktikyYT.LocalScript:5: attempt to index nil with 'Name'
Line 5
DETAILS:
LocalScript located in StarterCharacterScripts

1 comment
Maybe you should try putting the “mouse” syntax in the function parentheses.