You need to use an animation to make the character roll. Make your own or take one.
A LocalScript is required for it to work.
local playerCharacter = game.Players.LocalPlayer.Character
local humanoid = playerCharacter:WaitForChild("Humanoid")
local anim = script.Animation
humanoid:LoadAnimation(anim):Play()
The playerCharacter variable stores the PlayerCharacter location. The humanoid variable stores the location of the character's humanoid. The anim variable stores the Animation's location. Change it to where your animation object is. (You need to insert an animation object in the workspace or as a child of ANYTHING and just make sure the script can locate it. Insert the animation's ID that you chose into the animation object and you're done. If you renamed your animation object to anything else then write the name of the animation object.) Finally, the last line tells the humanoid as you see the variable being called and the LoadAnimation function is also called. Into the parentheses of the LoadAnimation function, the anim variable's name is in it. Then, the Play() function well... plays the animation. Hope that helps.
1 comment
Just use an animation.