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

Why Isn't the back scythe not appearing In the morphs hand?

Asked by 2 years ago

So I made a morph which has a custom bodypart called: "Scythe" and there Is a decoy called: "FakeScythe"

Basically, what the script does Is that It plays a equip animations and causes the user to basically put there scythe behind them and pull out the gun, the problem Is that If the user unequips the tool, the scythe doesn't appear In there hands, Instead, It will still appear on there back

Script:

local tool = script.Parent
local Idle

tool.Equipped:Connect(function()
    local Equip = tool.Parent.Humanoid:WaitForChild("Animator"):LoadAnimation(tool.Equip)
    Equip:Play()
    wait(0.30)
    tool.Parent.Scythe.Transparency = 1
    tool.Parent.FakeScythe.Transparency = 0
    wait(0.29)
    tool.Handle.Transparency = 0
    local OtherParts = tool.Parts:GetChildren()
    for _, OtherParts in ipairs(OtherParts) do
        if OtherParts:IsA("BasePart") then
            OtherParts.Transparency = 0
        end
    end
    Idle = tool.Parent.Humanoid:WaitForChild("Animator"):LoadAnimation(tool.Idle)
    Idle:Play()
    tool.Unequipped:Connect(function()
        Idle:Stop()
        tool.Parent.Scythe.Transparency = 0
        tool.Parent.FakeScythe.Transparency = 1
    end)
end)

Answer this question