mouse:GetPropertyChangedSignal("Target"):Connect(function()
print(mouse.Target.Name)
if mouse.Target.Name == "Head" then
mouse.Icon = "rbxassetid://10487589050"
end
end)
(LocalScript) can anyone tell me why this doesn’t print anything?
mouse:GetPropertyChangedSignal("Target"):Connect(function()
print(mouse.Target.Name)
if mouse.Target.Name == "Head" then
mouse.Icon = "rbxassetid://10487589050"
end
end)
(LocalScript) can anyone tell me why this doesn’t print anything?
What is the variable for mouse if I may ask?
What is your script trying to do?
You can use Move(), it’ll fire at the same time as “Target” anyway for an alternative
It looks like if the mouse is pointing at a player’s head that It will change the mouse cursor icon
What is the parent of this script?
Target is one of those properties that Roblox internally disables from firing (Same for Changed).
In this case, you’d be better off just checking it at Input Priority with :BindToRenderStep
game:GetService("RunService"):BindToRenderStep("Mouse Target", Enum.RenderPriority.Input.Value, function()
if Mouse.Target and Mouse.Target.Name == "Head" then
print(Mouse.Target.Name)
end
end)
It’s not possible to detect when it changes.
Sadly you will have to put it in a loop.
game.Players.LocalPlayer:GetMouse()
Change the mouse icon (for a gun tool) when it is pointing at a player’s head
The gun tool
((((thirtycharsruleisbad))))