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

How to make an Auto-Package script?

Asked by 10 years ago

So, I can't seem to figure out why it isn't cloning into the character. Here is the current script.

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
a = script.MonsterLeftArm:clone()
print(a) -- Returns "MonsterLeftArm", as it should.
a.Parent = character
print(a.Parent) -- Returns "Player1", as it should.
end)
end)

Problem is, Player1 isn't actually it's parent, it's not in Player1.

1 answer

Log in to vote
-1
Answered by 10 years ago

Make a Model Name it whatever u want then put this script in the model,name the script body armor,after u put the script in make models of the body parts Example:Right"Legweld".Do that for every body part.Then Add the New Body parts in the Rightleg,Leftlegwel,headweld,rightlegweld,and left leg weld.(Note:You Have to Cframe it)Then after your done putting in the body parts Cut The Main Model(Which is the One were you put all the body part welds)it Then Put in Starterpack make = script.Parent head = make:findFirstChild("HeadWeld") leftarm = make:findFirstChild("LeftArmWeld") rightarm = make:findFirstChild("RightArmWeld") leftleg = make:findFirstChild("LeftLegWeld") rightleg = make:findFirstChild("RightLegWeld") torso = make:findFirstChild("TorsoWeld") p = script.Parent.Parent.Parent char = script.Parent.Parent.Parent.Character --[[part = script.Parent:FindFirstChild("Activate") touch = false

if part == nil then repeat wait() until char -- waits until player actually exists touch.Value = true elseif part ~= nil then part.Touched:connect(function(hit) h = hit.Parent:findFirstChild("Humanoid") if h ~= nil then touch.Value = true end end) end]]

repeat wait() until char

if head ~= nil then head2 = head:Clone() head2.Parent = p.Character weld1 = Instance.new("Weld", head2:findFirstChild("Handle")) weld1.Part0 = head2:findFirstChild("Handle") weld1.Part1 = p.Character:findFirstChild("Head") -- header = head:GetChildren() --[[ for c = 1, #header do if header[c].ClassName == "Part" then header[c].Anchored = false header[c].CanCollide = false end end]]-- end if leftarm ~= nil then leftarm2 = leftarm:Clone() leftarm2.Parent = p.Character weld2 = Instance.new("Weld", leftarm2:findFirstChild("Handle")) weld2.Part0 = leftarm2:findFirstChild("Handle") weld2.Part1 = p.Character:findFirstChild("Left Arm") -- la = leftarm:GetChildren() --[[ for c = 1, #la do if la[c].ClassName == "Part" then la[c].Anchored = false la[c].CanCollide = false end end]]-- end if rightarm ~= nil then rightarm2 = rightarm:Clone() rightarm2.Parent = p.Character weld3 = Instance.new("Weld", rightarm2:findFirstChild("Handle")) weld3.Part0 = rightarm2:findFirstChild("Handle") weld3.Part1 = p.Character:findFirstChild("Right Arm") -- ra = rightarm:GetChildren() --[[ for c = 1, #ra do if ra[c].ClassName == "Part" then ra[c].Anchored = false ra[c].CanCollide = false end end]]-- end if leftleg ~= nil then leftleg2 = leftleg:Clone() leftleg2.Parent = p.Character weld4 = Instance.new("Weld", leftleg2:findFirstChild("Handle")) weld4.Part0 = leftleg2:findFirstChild("Handle") weld4.Part1 = p.Character:findFirstChild("Left Leg") -- ll = rightarm:GetChildren() --[[ for c = 1, #ll do if ll[c].ClassName == "Part" then ll[c].Anchored = false ll[c].CanCollide = false end end]]-- end if rightleg ~= nil then rightleg2 = rightleg:Clone() rightleg2.Parent = p.Character weld5 = Instance.new("Weld", rightleg2:findFirstChild("Handle")) weld5.Part0 = rightleg2:findFirstChild("Handle") weld5.Part1 = p.Character:findFirstChild("Right Leg") -- rl = rightarm:GetChildren() --[[ for c = 1, #rl do if rl[c].ClassName == "Part" then rl[c].Anchored = false rl[c].CanCollide = false end end]]-- end if torso ~= nil then torso2 = torso:Clone() torso2.Parent = p.Character weld6 = Instance.new("Weld", torso2:findFirstChild("Handle")) weld6.Part0 = torso2:findFirstChild("Handle") weld6.Part1 = p.Character:findFirstChild("Torso") -- t = rightarm:GetChildren() --[[ for c = 1, #t do if t[c].ClassName == "Part" then t[c].Anchored = false t[c].CanCollide = false end end--]] end

0
Put this script in workspace for the original body parts wont show:function onPlayerRespawned(newPlayer) local char = newPlayer.Character char.Head.Transparency = 0 char["Left Arm"].Transparency = 1 char["Right Arm"].Transparency = 1 char["Left Leg"].Transparency = 1 char["Right Leg"].Transparency = 1 char.Torso.Transparency = 1 end function onPlayerEntered(newPlayer) newPlayer.Ch FPSStudioDidi 1 — 10y
1
Use the features that scripting helpers come with, like the Lua button, and the bold text. Reading this raw is hard enough, and no one likes to read like that. Nickoakz 231 — 10y
Ad

Answer this question