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

Challenge for advanced scripters... - MORPHER?

Asked by 8 years ago

Currently I'm making a game and you become an elf. I want it so when you touch a brick you go to a certain size but keep all your clothes ect.

Hopefully you can help!

This resizes it to the right size but you die and the pieces are floating around;

script.Parent.Touched:connect(function(hit)

    hit.Parent.LeftFoot.Size = Vector3.new(0.52, 0.156, 0.52)


    hit.Parent.LeftHand.Size = Vector3.new(0.52, 0.156, 0.52)


    hit.Parent.LeftLowerArm.Size = Vector3.new(0.52, 0.624, 0.52)


    hit.Parent.LeftLowerLeg.Size = Vector3.new(0.52, 0.78, 0.52)


    hit.Parent.LeftUpperArm.Size = Vector3.new(0.52, 0.728, 0.52)


    hit.Parent.LeftUpperLeg.Size = Vector3.new(0.52, 0.78, 0.52)


    hit.Parent.LowerTorso.Size = Vector3.new(1.04, 0.208, 0.52)


    hit.Parent.UpperTorso.Size = Vector3.new(1.04, 0.832, 0.52)


    hit.Parent.RightFoot.Size = Vector3.new(0.52, 0.156, 0.52)


    hit.Parent.RightHand.Size = Vector3.new(0.52, 0.156, 0.52)


    hit.Parent.RightLowerArm.Size = Vector3.new(0.52, 0.624, 0.52)


    hit.Parent.RightLowerLeg.Size = Vector3.new(0.52, 0.78, 0.52)


    hit.Parent.RightUpperArm.Size = Vector3.new(0.52, 0.728, 0.52)


end)
1
First i would recommend using a loop instead of repeating yourself. Also the reason you are dying is because you are breaking the joints that keep the character together when you resize the parts. StoIid 364 — 8y
0
You can try removing the humanoid before resizing to prevent the Died event from triggering, and then re-add it in once you're done, along with the joints. You can get the joints by capturing them all in a loop before you resize, and Parent them back in StoIid 364 — 8y

Answer this question