so my idea was when you press z it plays an animation of you sitting down and then 1.6 seconds later it plays the looping seated animation .
what happens is if you press z nothing happens and if you press it again you are seated.
its skipping the sitting down animation
any help i can get is appreciated
local player = game.Players.LocalPlayer
repeat wait() until player.Character.Humanoid
local humanoid = player.Character.Humanoid
local mouse = player:GetMouse()
local SD = game.Workspace.SittingDown
SD.AnimationId = "http://www.roblox.com/asset/?id=933356177"
local S = game.Workspace.Seated
SD.AnimationId = "http://www.roblox.com/asset/?id=933369397"
mouse.KeyDown:connect(function(key)
if key == "z" then
local playAnim = humanoid:LoadAnimation(SD)
playAnim:Play()
wait(1.6)
local playAnim = humanoid:loadAnimation(S)
playAnim:Play()
end
end)

1 comment
Try using UserInputService