Hello, I am working on a combat system with a friend. I am currently working on a air combo finisher that slams them into the ground.
It uses raycasts to detect the ground that the target is going to be positioned to, and sets the targets position to the raycast result. Here is how I want it to work.
Blue: Starting Position/Main Player
Red: Direction I want the ray to go
Orange: Ending position/where the target will go
But this is happening.
the raycast goes straight down instead of infront of the player and down. Any idea how to fix this? Thanks a lot!
CODE:
local ray = workspace:Raycast(char.HumanoidRootPart.Position,Vector3.new(-char.HumanoidRootPart.CFrame.lookVector * 500,-100,0),rParams)