#Need help!!

1 messages · Page 1 of 1 (latest)

harsh blade
#

how do i like implement the ids to the animations, and how do i add animations, and how do i change the number after it adds 1 after one click to switch to the next click

ashen crest
#

local uis = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

local M1s = {
"98490265142865",
"140381833256634"
}

local currentM1 = 1

uis.InputBegan:Connect(function(input, isTyping)
if isTyping then return end

if input.UserInputType == Enum.UserInputType.MouseButton1 then
    local anim = Instance.new("Animation")
    anim.AnimationId = "rbxassetid://" .. M1s[currentM1]

    local track = Humanoid:LoadAnimation(anim)
    track:Play()

    track.Stopped:Connect(function()
        anim:Destroy()
    end)

    currentM1 += 1
    if currentM1 > #M1s then
        currentM1 = 1
    end
end

end)

harsh blade
#

omg

#

thx so much!

#

this is gonna help me learn so much!!

#

(i wasnt trying to be rude btw it js sounds kinda rude)