Making a block animation work on holding F, but it will stay at the block keyframe after the startup. To do this, I made a seperate animation that has the last keyframes of the other block animation but its looping at that one keyframe. The animation is not loading, this is in a local script. Block idle is the looping animation, block is the one with a startup.
local plr = game.Players.LocalPlayer
local bruh
local EZ
local LOL
local WOW
local inputservice = game:GetService("UserInputService")
local char = plr.Character or plr.CharacterAdded:wait()
local humanoid = char:WaitForChild("Humanoid")
local blockidle = Instance.new("Animation")
blockidle.AnimationId = "rbxassetid://5830357100"
local runtrack = humanoid:LoadAnimation(blockidle)
local block = Instance.new("Animation")
block.AnimationId = "rbxassetid://5829956934"
local runtrack2 = humanoid:LoadAnimation(block)
local function newanim()
runtrack:Play()
end
local function onCharacterAdded(char)
local hum = char:WaitForChild("Humanoid")
bruh = humanoid:LoadAnimation(block)
WOW = humanoid:LoadAnimation(blockidle)
local function inputended(input)
if Enum.KeyCode == Enum.KeyCode.F then
runtrack:Stop()
runtrack2:Stop()
end
local function block()
EZ = runtrack2:GetMarkerReachedSignal(block):Connect(newanim)
LOL = inputservice.InputEnded:Connect(inputended)
end
local function inputBegan(input)
if Enum.KeyCode == Enum.KeyCode.F and script.Parent.Parent.DuskSword.Equipped == true then
block()
runtrack2:Play()
end
plr.CharacterAdded:Connect(onCharacterAdded)
inputservice.InputBegan:Connect(inputBegan)
end
end
end