I have a script, and its supposed to make the player's character move by six studs. And, I am soon going have an animation to this(if this script works), this is to simulate "Rolling."
Here's the script
local Plr = game:GetService("Players").LocalPlayer local Mouse = Plr:GetMouse() Mouse.KeyDown:connect(function(key) key = key:lower() if key == "r" then print("R has been pressed!") local Character = Plr.Character local RootPart = Character.HumanoidRootPart RootPart.CFrame = RootPart.Position + CFrame.new(0,0,6) end end)
And, don't please judge I'm using the mouse, its the only way I know how to use key down. Thanks