Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I knock over an NPC or player in a natural way?

I want the punch to knock someone over. But this is what I use and it looks very rough. What is a more natural way to knock a player or character down like this?

HitChar:SetPrimaryPartCFrame(CFrame.new(HitChar.PrimaryPart.Position)*CFrame.Angles(math.pi/2, 0, 0))

I also tried this in a Server script:

local HitHumanoid = HitChar:FindFirstChild("Humanoid")

HitHumanoid:ChangeState(Enum.HumanoidStateType.Ragdoll)
wait(2)

HitHumanoid:ChangeState(Enum.HumanoidStateType.GettingUp)

I made a punching ability, but it's missing one feature. Knocking the players/NPC's over when I punch them. How do I knock over players?

PlatformStand is out of the question, because I want to knock players over not float them through the floor.

1 answer

Ok, I may have said what PlatformStand does incorrectly. Sure, it does make the character go through the floor, but you could try finding a way to then make it push over so it doesn't go through the floor and thus, gives you the result you want.

Here is a link to a demonstration of how PlatformStand works (sorry for bad quality):

https://media.giphy.com/media/RGpOKyLl22ZT26jUQu/giphy.gif

Otherwise use the sit value and knock the player/NPC over.

3 comments

0

You set that gif to private

0

Also, are you sure sitting them down would look natural?

0

ok it should be public now, also sitting is just an alternative to platform stand. it doesn't look too natural but it works at least.

This discussion is preserved as it was. New answers, comments, and votes are closed.