Roblox developer said that the mouse object should not be used in new work, but I could not find an equivalent thing on userinputservice or contextactionservice
If there is one could you please tell me it and show me how it works? Thank you.
Roblox developer said that the mouse object should not be used in new work, but I could not find an equivalent thing on userinputservice or contextactionservice
If there is one could you please tell me it and show me how it works? Thank you.
You can bind a function to ContextActionService for Enum.UserInputType.MouseMovement, then whenever the function is called you can update the current screen position by using the InputObject parameter’s “Position” property. From the screen position, you can get information about the mouse’s position in 3D space and what it hit by using the camera’s “ScreenPointToRay” method and then performing a raycast. There may be better ways, but I’ve been using a similar method for a while.
ok, I think I understand what you are talking about. I read about ScreenPointToRay just now and ill try to use it.
the issue is that I don’t know how to convert the vector 3 into an actual target
Why can you not use Mouse.Target?
i didn’t want to because it is said that the mouse object should not be used for new work. Maybe roblox will delete it soon. I don’t know.
![]()
They won’t delete it soon, it is not deprecated
oh ok then I think I might use mouse then.