First this is my reference where i think it will help me , i added these two on my script.. but it not working.. What i want to do is when a player enters game the Morph1 childrens Arm1 and other body parts will be copy to him.. the morph1 is located in lohghning..
http://wiki.roblox.com/index.php?title=API:Class/Instance/FindFirstChild http://wiki.roblox.com/index.php?title=PlayerAdded
I really tried hard editing this.. this script was ontouch function but i edited it.. no work..
local Players = game:GetService("Players")
function onPlayerAdded(player)
function findFirstChild(instance, name, recursive)
if hit:findFirstChild("Humanoid") ~= nil and hit:findFirstChild("Arm1") == nil then
local g = game.Lighting.Morph1.Arm1:clone()
g.Parent = hit
local C = g:GetChildren()
for i=1, #C do
if C[i].className == "Part" then
local W = Instance.new("Weld")
W.Part0 = g.Middle
W.Part1 = C[i]
local CJ = CFrame.new(g.Middle.Position)
local C0 = g.Middle.CFrame:inverse()*CJ
local C1 = C[i].CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = g.Middle
end
local Y = Instance.new("Weld")
Y.Part0 = hit["Left Arm"]
Y.Part1 = g.Middle
Y.C0 = CFrame.new(0, 0, 0)
Y.Parent = Y.Part0
end
local h = g:GetChildren()
for i = 1, # h do
if h[i].className == "Part" then
h[i].Anchored = false
h[i].CanCollide = false
end
end
end
end
Players.PlayerAdded:connect(onPlayerAdded)

1 comment
THNXS TO U I LEARN ALOT FROM THIS THNXXX