I get the error "Workspace.Migsguycov_4.LocalScript:6: Expected identifier when parsing expression, got 'local'", idk how to fix it
This is the code btw:
local UserInputService = game:GetService("UserInputService")
local Character = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait()
local debounce = false
local slideAnim = -- insert the path to your slide animation here
local function onKeyPress(input)
if input.KeyCode == Enum.KeyCode.Backspace then
local Velocity = Character.HumanoidRootPart:FindFirstChild("Velocity")
if Velocity then
Velocity.Velocity = Vector3.new(0, 0, 0)
end
elseif input.KeyCode == Enum.KeyCode.LeftControl then
if not debounce then
debounce = true
local SldAnimationPlay = Character.Humanoid:LoadAnimation(slideAnim)
SldAnimationPlay:Play()
local Velocity = Instance.new("BodyVelocity")
Velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
Velocity.Velocity = Character.HumanoidRootPart.CFrame.lookVector * 100
Velocity.Name = "Velocity"
Velocity.Parent = Character.HumanoidRootPart
wait(1)
SldAnimationPlay:Stop()
Velocity:Destroy()
wait(1)
debounce = false
end
end
end
UserInputService.InputBegan:Connect(onKeyPress)
** You are now Level 12! **