I have recently been trying to make a morph from scratch by dissecting lots of free model morphs to try and find out how they work. However I am getting stuck on a few things.
So far it seems they copy and paste parts of the morph model into the player who activates them, and the copy-pasted parts override the existing parts of said player. Is this correct or is it more complicated than that?
Another thing is the morph scripts I've been reading have a common occurrence of this 'for i,b in pairs () do' thingy, example here
BodyParts = hit.Parent:GetChildren() for i,b in pairs(BodyParts) do if (b.className == "Humanoid") then CanMorph = true end
What is up with that?
This script is literally, going through everything in the hit.Parent, and IF one of them is a Humanoid, CanMorph is true. Its to make sure whatever hit it, is an actual player, and not like a part, or union or w/e.
for i,v in pairs(hit.Parent:GetChildren()) do if v:IsA("Humanoid" then CanMorph = true end -- v is each part of (hit.Parent:GetChildren()) -- i is the number of 'things' found.