Is it possible to create a function that stuns the player when they take damage?
Hello, eze123456!
I'm providing you a script because... you deserve it.
01 | --LocalScript |
02 | -- Place it in the starterpack. |
03 |
04 | player = game.Players.LocalPlayer -- First, we get the LocalPlayer |
05 |
06 | used = false |
07 |
08 | anim = script.Animation -- Note : You have to make an animation inside roblox's Animation Plugin, then you have to create an Animation Object inside this script (not plugin), |
09 | --MAKE SURE to get the Id. |
10 |
11 | hum = player.Character.Humanoid |
12 |
13 | animTrack = hum:LoadAnimation(anim) |
14 |
15 | player.Character.Humanoid.HealthChanged:Connect( function () -- This, is a Function, it only works when the player's health changes! |
Yes its possible
there's is many ways you can do it!
you could insert a Bool Value inside your character and make it false and name it "StunValue"
then you could add a script to make it if the bool value changed to true then it will set your walkspeed to 0 or enable platform stand like unsatisfied_d said.