Falling when hit

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:

Crazy Cattle 3D: https://www.youtube.com/watch?v=Q141PhG166o
My game: https://youtu.be/PJaVRvYcPWU

If you can provide any help that is greatly appreciated thank you :pray:.

Since each client owns their character, you may need to change PlatformStand (for just a moment) each time a player is hit.

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.

the only problem with this though is won’t both players be checked in both hitboxes if they hit each other?

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

Just tried this out., and it works pretty well, just need to make a lot of changes.

Basically the script finds when the player collides with another player, and whoever had the greater speed gets hit.

now i just need to figure out why the player is stuck in the ground when platform stand is on :sob:

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!

1 Like

You characters are moving forward when they hit another character.

So, maybe weld a small part in front of each character. [X] >

That way, when they hit another player, you will know which one did the “hitting”.

The PlatformStand would then be applied to the “hit” character.