Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sword animation does not play properly in r15 humanoid, why?

Asked by 7 years ago

So this is the problem, I had this sword been working with r6 without having any problem but now I wanted to turn it to r15, everithing is working exept for one thing. The animation. I have already switched the animations id to r15 animation but for some reason the right arm of the player freezes, like the whole animation plays exept for the right arm of your chacter... Does it have anithing to do with the animation script below? If so, whats wrong? If its not because of the script what do you guys suggest?

local Tool = script.Parent;

local walking = 0
local hold
local walk

enabled = true
function onButton1Down(mouse)
    if not enabled then
        return
    end

    local vCharacter = Tool.Parent
    local hum = vCharacter:findFirstChild("Humanoid")
    hum:LoadAnimation(script.Parent.Slash):Play()
    enabled = false
    mouse.Icon = "http://www.roblox.com/asset/?id=248193486"

    wait(1)
    mouse.Icon = "http://www.roblox.com/asset/?id=248193464"
    enabled = true

end

function onKeyDown(key)
    if walk and (key == "w") or (key == "a") or (key == "s") or (key == "d") then
        walk:Play()
        walking = walking + 1
    end
end

function onKeyUp(key)
    if walk and (key == "w") or (key == "a") or (key == "s") or (key == "d") then
        walking = walking - 1
        if walking == 0 then
            walk:Stop(0)
        end
    end
end

function onEquippedLocal(mouse)

    if mouse == nil then
        print("Mouse not found")
        return 
    end

    local vCharacter = Tool.Parent
    local humanoid = vCharacter.Humanoid

    hold = humanoid:LoadAnimation(Tool.HoldSword)
    walk = humanoid:LoadAnimation(Tool.WalkSword)

    hold:Play()

    mouse.Icon = "rbxasset://textures\\GunCursor.png"
    mouse.Button1Down:connect(function() onButton1Down(mouse) end)
    mouse.KeyDown:connect(onKeyDown)
    mouse.KeyUp:connect(onKeyUp)
end

function onUnequippedLocal()
    hold:Stop()
    walk:Stop()

    hold = nil
    walk = nil
end

Tool.Equipped:connect(onEquippedLocal)
Tool.Unequipped:connect(onUnequippedLocal)

3 answers

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

I think you may have to make your own custom animation for the sword attack. If the sword was built for R6 it WONT work in R15. I had to recreate all my animations for my swords. The sword plugs into the Motor6D's that R6 uses but if it sees extra or less the animation completely brakes.

So I think the solution to your problem would be to create your own attack animation. Using animation editor and an R15 rig.

0
Already done that, still does not work prooheckcp 340 — 7y
Ad
Log in to vote
0
Answered by
farrizbb 465 Moderation Voter
7 years ago

When you make an animation , they're couple blocks if you click on them then that part will not be animated that may be why so check your animation again.

Log in to vote
0
Answered by 5 years ago

Maybye when you do the animation you put the priority of it on action.

Answer this question