What do you want to achieve? Keep it simple and clear!
So i want to make a raycast that fires each time you hit punch (m1), and if the ray doesn’t detect anything, it will set a downslamstate value to true, which will enable you to downslam an opponent.
What is the issue? Include screenshots / videos if possible!
Issue is, its like the ray origin position doesnt change when i run it, its hard to explain but heres a video:
task.spawn(function()
local rayResult = workspace:Raycast(RootPart.CFrame.Position, -(RootPart.CFrame.UpVector.Unit * 6.5), downSlamParams)
if not rayResult then
if not DownslamState[userId] then
DownslamState[userId] = true
end
clientFX:FireClient(Player, "LoadAnim", {Animation = repStorage.Animations.DefaultFist.Downslam})
else
DownslamState[userId] = false
end
end)
No, i don’t think it is wrong, because i just did it on the client and it works. It seems as if it was server delay. Also, im detecting if there is no raycast, which means the character is in the air. If it does detect a raycast, then im at the ground and it will not do a downslam.