Basically, what the title says.
I want to do something to change the StarterPlayer after touching a part, and to do so, i tought of doing a script like this
script.Parent.TouchEnded:connect(function(part)
local Content = script.Parent.Parent.TransformContent
local Player = part.Parent:FindFirstChild("Humanoid")
if Player == nil then return end
Player.Parent:ClearAllChildren()
local Morphing = Content:Clone()
Morphing.Parent = Player.Parent
end)
Note: check this image to understand this better -http://prntscr.com/j9l5bs
However, the script dint work as i tought. So, can us tell me how to clone the Children of "TransformContent" to the Player's Parent (aka: The player's model that gets empty after the "clearallchildren" on the script), please?
Also, Yes, i know that brick isnt rigged and it wont work as a starterplayer, is just that ill rig it later. Second, No, this isnt for a roleplay or something like that, its for a minigame game that uses cubes with eyes as the main characters.

1 comment
Making use of the GetChildren() function and the 'pairs' loop.