You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
My dash like in roblox grace sliding system doesn’t work, character stays in place and doesn’t move
What is the issue? Include screenshots / videos if possible!
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character : Model = Player.Character or Player.CharacterAdded:Wait()
local Humanoid : Humanoid = Character:WaitForChild("Humanoid")
local Animator : Animator = Humanoid:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local RepStorage = game:GetService("ReplicatedStorage")
local Tweenservice = game:GetService("TweenService")
local Anim = RepStorage.Animations.Slide
UIS.InputBegan:Connect(function(Input, gameprocess)
if gameprocess then return end
if Input.KeyCode == Enum.KeyCode.Q then
local LoadedAnim : AnimationTrack = Animator:LoadAnimation(Anim)
LoadedAnim.Looped = false
LoadedAnim:Play()
local velocity = Instance.new("LinearVelocity")
velocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
velocity.ForceLimitMode = Enum.ForceLimitMode.PerAxis
velocity.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
velocity.VectorVelocity = Vector3.new(0, 0,-500)
velocity.Attachment0 = Character.HumanoidRootPart.RootAttachment
velocity.Parent = Character.HumanoidRootPart
velocity.MaxForce = math.huge
velocity.Enabled = true
local Info = TweenInfo.new(10, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local SlowingDown = Tweenservice:Create(velocity, Info, {VectorVelocity = Vector3.zero})
end
end)
So it was weird and I had to re-write some parts because they didn’t make sense to me.
Try this (Untested):
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RepStorage = game:GetService("ReplicatedStorage")
local Tweenservice = game:GetService("TweenService")
local Debris = game:GetService("Debris")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAppearanceLoaded:Wait()
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local Animator = Humanoid:FindFirstChildOfClass("Animator")
local HRP = Character:FindFirstChild("HumanoidRootPart") :: BasePart
local RootAttachment = HRP:FindFirstChildOfClass("Attachment")
local Anim = RepStorage.Animations.Slide
UIS.InputBegan:Connect(function(Input:InputObject, GPE:boolean)
if GPE then return end
if Input.KeyCode ~= Enum.KeyCode.Q then return end
local LoadedAnim = Animator:LoadAnimation(Anim)
LoadedAnim.Looped = false
local Vel = Instance.new("LinearVelocity")
Vel.Attachment0 = RootAttachment
Vel.MaxForce = math.huge
Vel.VectorVelocity = HRP.CFrame.LookVector * 50
Vel.Parent = RootAttachment
LoadedAnim:Play()
Debris:AddItem(Vel, 0.5)
end)
It doesn’t have the camera thing yet so its a static dash
For most dashes, the direction in which they dash in are the same. What he wants is for the direction of where the players camera is be used to control the dash control. I personally didn’t include it because I would’ve been spoon feeding