I’m working on a solo project based on a game called Crazy Cattle 3D. I’ve gotten pretty far, being able to kind of remake the movement, but I don’t know how to make it so if the player is hit hard enough by another player, they fall.
Here are some clips of how I am trying to get it to look like vs my game:
I’ve already tried something similar to this with the following script:
script.Parent.Touched:Connect(function(TouchedPart)
if TouchedPart.Parent:FindFirstChild("Humanoid") then
TouchedPart.Parent.Humanoid.PlatformStand = true
wait(1)
TouchedPart.Parent.Humanoid.PlatformStand = false
end
end)
How would I be able to find if the player is hit ONLY by another player, and only the player hit gets this effect?
Create a hitbox around the player and weld it, then just check if something is in that box is the easiest way.
Complex way I suppose would to use raycasts and check if the player hit another player could be resource intensive too, try the simple way first or if someone comes up with a better solution.
Hm good point, maybe you can create certain scenarios? Take whoever is moving faster then knock over the victim. Someone else may have a better solution than me.
Edit: Thinking about it now you could possibly cheese it by making the cattle a motorcycle? I never played CrazyCattle but just by seeing videos it looks like it could done by invisible Oval Wheels? So this way when you hit someone you can get some lean. No idea just a crazy thought lol
You could try and implement your own ragdoll system that would be customized to CrazyCattle physics, it uses Motor6D i believe, so you could try and look into that? Like ragdoll the player so they fall over then apply a force that knocks them back lets say Attacker.Speed / 1.5 or something no idea. But i’d look into Ragdoll Systems theres a bunch of community made modules here on the devforum!