Hello!
I am working on something right now, and I had just now been noticing that my script is a slight inaccurate to the true mouse position.
SCRIPT:
--# MOUSE
local distanceFromMouse = (RightHand.Position - mousePosition).Magnitude
local a = Instance.new("Part", workspace)
a.Anchored = true
if (distanceFromMouse <= abilitySettings['distance_limit']) then
a.Position = mousePosition
else
a.Position = RightHand.Position + ((mousePosition - RightHand.Position).Unit) * abilitySettings['distance_limit']
end
I am hoping that someone has a solution to this, wanting it to be as accurate as possible. I am trying to make it so a part spawns where the mouse position is, but to keep it in a specific radius of the character.