#My animation plays weird when I try to trigger it ingame (2nd m1)

1 messages · Page 1 of 1 (latest)

ocean osprey
#

When i trigger one of my animations ingame it plays with alot less movement than how it is played in the animation editor

the code (someone save me i started learning lua yesterday JotaroCry )

local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local Humanoid = character:WaitForChild("Humanoid")

local JasperClick1 = Humanoid:LoadAnimation(script.Animations.JasperClick1)
local JasperClick2 = Humanoid:LoadAnimation(script.Animations.JasperClick2)
local JasperClick3 = Humanoid:LoadAnimation(script.Animations.JasperClick3)
local JasperClick4 = Humanoid:LoadAnimation(script.Animations.JasperClick4)
local JasperClick5 = Humanoid:LoadAnimation(script.Animations.JasperClick5)

local combo = 1

UIS.InputEnded:Connect(function(I,E)
if E then return end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
if combo == 5 then
game.ReplicatedStorage.MainEvent:FireServer()
JasperClick5:Play()
spawn(function()
task.wait(.1)
combo = 1
end)

    elseif combo == 4 then
        game.ReplicatedStorage.MainEvent:FireServer()
        JasperClick4:Play()
        combo = combo + 1
        
    elseif combo == 3 then
        game.ReplicatedStorage.MainEvent:FireServer()
        JasperClick3:Play()
        combo = combo + 1
        
    elseif combo == 2 then
        game.ReplicatedStorage.MainEvent:FireServer()
        JasperClick2:Play()
        combo = combo + 1
        
    elseif combo ==1 then
        game.ReplicatedStorage.MainEvent:FireServer()
        JasperClick1:play()
        combo = combo + 1
        
    end
    game.ReplicatedStorage.MainEvent:FireServer()
    JasperClick1:Play()
end

end)

eager tartan
ocean osprey
#

action

ivory cairn
#

so

#

your first m1 and second m1 probably overlapped

#

and since they both have the same priority, they mix

ocean osprey
#

i clicked with like 10 seconds inbetween

#

and the same thing still happens

ivory cairn
#

wait

#

im gonna take a look at ur script

#

now my question is
elseif combo ==1 then
game.ReplicatedStorage.MainEvent:FireServer()
JasperClick1:play()
combo = combo + 1
end
game.ReplicatedStorage.MainEvent:FireServer()
JasperClick1:Play()
why did you play the m1 outside the if chain?

#

of course it'll overlap

ocean osprey
#

oh yeah

#

i did that to test if it was recieving input

#

forgot to delete

#

😭

eternal trail
arctic vigil
#

what the FUCK is this??

#

worst script ive seen all week

#

use fucking OOP mf

sturdy lagoon
#

He started learning lua yesterday and probably coding in general, of course it's gonna be bad. We all went through that. You don't have to be an a-hole about it.

#

If it works, it works. He'll know how to improve it in his next project

eager tartan