Help with a roll script

I’ve been trying to make a script where you press a certain keybind and then you roll. I’ve tried scripting one and searching up tutorials and they don’t work at all. I’d like some solutions since i can’t make a script for this.

Thanks!

I know how to use UIS and putting animations into games but i just dont know how to change the position of a player without using cframe.

You can use a body mover to move the player I would use Body position or body force.

This might not work but you can try it out since I can’t test it.

-- put this in starter character
local UserInputS = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local HumanRootPart = character:WaitForChild("HumanoidRootPart")
local BodyPos 
local Force = 625000

UserInputS.InputBegan:Connect(function()
BodyPos = Instance.new("BodyPosition")
BodyPos.Parent = HumanRootPart
BodyPos.D = 250
BodyPos.P = 2500
BodyPos.MaxForce = Vector3.new(Force.Force.Force)
BodyPos.Position = HumanRootPart.Cframe.RightVector * 100 -- Change it to your choosing, also if you want them to go the left instead of the right then change it to Negative.
end)

UserInputS.InputEnded:Connect(function()
wait(0.15) 
BodyPos:Destroy() -- You could also use debris. -> game.Debris:AddItem(BodyPos, 0.15)
end)