Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would i stun a player?

Asked by 5 years ago

Theres a game that ive been playing and ive wondered how one of the weapons work. If you were to hit someone with this bat they would go flying. What would you use to fling the player away?

(not a request, just a general question)

0
You would insert a body mover into the HumaniodRootPart of a player when they are touched with a part in the tool Fad99 286 — 5y
1
game.Players.LocalPlayer:Kick('ur stunned because u just left the game') greatneil80 2647 — 5y
0
lmao thanks ^ Bylli_Oruze 38 — 5y
0
Body velocity and Humanoid.PlatformStand = true SoftlockedUnderZero 668 — 5y

1 answer

Log in to vote
0
Answered by
EthanFins 104
4 years ago

first you will need to make the player not be able to move here

player.Character.Humanoid.JumpPower = 0
player.Character.Humanoid.WalkSpeed = 0

this will not allow the player to move

Now you will need to add a body velocity to the players HumanoidRootPart Like this!

local BodyVelocity = Instance.new("BodyVelocity",player.Character.HumanoidRootPart)

after those things you will need to make the player fly back using LookVector with CFrame like this :

BodyVelocity.Velocity = script.Parent.CFrame.LookVector * -100
wait(1)
BodyVelocity:Destroy()

Hope I Helped!

0
Note This will all have to be added to the weapon and you will have to use Remote Events on it too! EthanFins 104 — 4y
0
il attempt to use that soon, and plus i forgot about this question, but thank you for taking the time to answer it, appreciate it dude Bylli_Oruze 38 — 4y
Ad

Answer this question