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;

01script.Parent.Touched:connect(function(hit)
02 
03    hit.Parent.LeftFoot.Size = Vector3.new(0.52, 0.156, 0.52)
04 
05 
06    hit.Parent.LeftHand.Size = Vector3.new(0.52, 0.156, 0.52)
07 
08 
09    hit.Parent.LeftLowerArm.Size = Vector3.new(0.52, 0.624, 0.52)
10 
11 
12    hit.Parent.LeftLowerLeg.Size = Vector3.new(0.52, 0.78, 0.52)
13 
14 
15    hit.Parent.LeftUpperArm.Size = Vector3.new(0.52, 0.728, 0.52)
View all 42 lines...
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