local UIS = game:GetService("UserInputService")
local char = script.Parent
local slideAnim = Instance.new("Animation")
slideAnim.AnimationId = "rbxassetid://6577673005" --Animation ID
local keybind = Enum.KeyCode.E
local canslide = true
UIS.InputBegan:Connect(function(input,gameprocessed)
if gameprocessed then return end
if not canslide then return end
if input.KeyCode == keybind then
canslide = false
local playAnim = char.Humanoid:LoadAnimation(slideAnim)
playAnim:Play()
local slide = Instance.new("BodyVelocity")
slide.MaxForce = Vector3.new(0.2,0,0.2) * 30000
slide.Velocity = char.HumanoidRootPart.CFrame.lookVector * 100
slide.Parent = char.HumanoidRootPart
for count = 1, 8 do
wait(0.1)
slide.Velocity *= 0.5
end
playAnim:Stop()
slide:Destroy()
canslide = true
end
end)
it gives just a error in output:
16:59:42.867 Workspace.xWhiteDip.SlideScript:17: Expected ‘]’ (to close ‘[’ at column 34), got ‘character’ - Studio - SlideScript:17
If i test the game it says an error:
17:12:09.486 Workspace.xWhiteDip.SlideScript:17: invalid argument #2 (string expected, got Instance) - Client - SlideScript:17