Currently, I am working on a punching script that, when working correctly, should fire out a short ray in front of the player's left hand. I haven't been able to figure out a way to track the raycasting direction to travel straight out from the player's fist though.
Here is the ray that is created -
local rayOrigin = leftHand.Position local rayDirection = Vector3.new(0,-1, 0) raycastParams.FilterDescendantsInstances = {char} raycastParams.FilterType = Enum.RaycastFilterType.Blacklist local raycastResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)
As you can see, right now the ray is created slightly below the player's fist which only works part of the time. If there is a way to extend the ray outwards farther whilst still maintaining the correct orientation, that would be awesome. I'm also open to other ideas for how to make this script work, any help would be most appreciated.