Hello, I need some help figuring out how to change the max distance a player can place an item to 25 studs from the character’s torso instead of 25 studs from the camera. Ideally, if there is a solution not using the legacy mouse as well that would be nice. Thanks!
https://gyazo.com/f772703b65302da429613559838ad736
local function MouseRaycast()
local mousePosition = uis:GetMouseLocation()
local mouseRay = camera:ViewportPointToRay(mousePosition.X, mousePosition.Y)
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Blacklist
params.FilterDescendantsInstances = { script.Parent, game.Players.LocalPlayer.Character }
local raycastResult = workspace:Raycast(mouseRay.Origin, mouseRay.Direction*25, params)
return raycastResult
end```