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

Can anyone help me fix my decal morphs? I can only morph once!

Asked by 7 years ago
Edited 7 years ago

Hi, I'm currently working on a roleplay game, and I have numerous decal morphs that work. However, once I have morphed to my chosen character I cannot morph into something else without resetting my character, it is beginning to get rather annoying and I am very new to scripting. Here is the current script that I have for my morphs:

DECAL = script.Parent.Decal 
Decal2 = script.Parent.Decal2
humanoid = script.Parent.Parent.Parent:findFirstChild("Humanoid")
running = false
DecalId = "http://www.roblox.com/asset/?id="
DecalId2 = "http://www.roblox.com/asset/?id="
DecalId3 = "http://www.roblox.com/asset/?id="
DecalJump = "http://www.roblox.com/asset/?id="
jumping = false

function Run(speed)
    if speed > 0 then
        running = true
    else
        running = false
        DECAL.Texture = DecalId
        Decal2.Texture = DecalId
    end
end

function Jump()
    DECAL.Texture = DecalJump
    Decal2.Texture = DecalJump
end

humanoid.Jumping:connect(Jump)
humanoid.Running:connect(Run)

--Kai12121212/Mileniathesecond~~ copy and paste the id take away one of the decals you have uploaded, the standing still is the first one the 2nd and 3rd are walking/running and the last is jump. if the morph messes up you chop off 1 example: 12345678 instead u would say 1234566 by taking one away

while true do 
wait(0.1)
if running then
    if DECAL.Texture == DecalId then
        DECAL.Texture = DecalId2
    elseif DECAL.Texture == DecalId2 then
        DECAL.Texture = DecalId3
    else
        DECAL.Texture = DecalId2
    end
    Decal2.Texture = DECAL.Texture
end
end 

I would really appreciate if someone could help me solve this issue, thanks!

1
Okay done, sorry about that. xEverForsakenx 6 — 7y

Answer this question