I have recently made a diving system for my new game. The dive animation plays which is good. BUT I have tried many ways for it to launch you forward, although it doesn’t work at all. I’m not really sure how to fix this, I’ve written about 5 or 6 different scripts and they are all a bust. So, if possible I need a bit of help modifying this script.
local Player = game.Players.LocalPlayer
local Character = Player.Character or script.Parent
local Humanoid = Character.Humanoid
local UserInputService = game:GetService("UserInputService")
local AnimationId = 'rbxassetid://12589073523'
local debounce = true
local Key = 'E'
UserInputService.InputBegan:Connect(function(Input, IsTyping)
if IsTyping then return end
if Input.KeyCode == Enum.KeyCode[Key] and debounce then
debounce = false
local Animation = Instance.new("Animation")
Animation.AnimationId = AnimationId
local LoadAnimation = Humanoid:LoadAnimation(Animation)
LoadAnimation:Play()
wait(2)
Animation:Destroy()
debounce = true
end
end)
Have a great day everyone!
![]()