|
| 06 Apr 2012 09:48 AM |
Well, to be honest, I don't what is wrong with this script...It works in Play Solo and when I "Start Server" and "Start Player," but it doesn't work when I actually go on a public server.
shirtid = "http://www.roblox.com/asset/?id=13343842" pantsid = "http://www.roblox.com/asset/?id=9735893"
function pe(np) function ca(p) wait(3) if p:findFirstChild("Shirt") then p.Shirt.ShirtTemplate = shirtid elseif p:findFirstChild("Shirt") == nil then shirta = Instance.new("Shirt") shirta.Parent = p shirta.ShirtTemplate = shirtid end
if p:findFirstChild("Pants") then p.Pants.PantsTemplate = pantsid elseif p:findFirstChild("Pants") == nil then pantsa = Instance.new("Pants") pantsa.Parent = p pantsa.PantsTemplate = pantsid end
end np.CharacterAdded:connect(ca) end game.Players.PlayerAdded:connect(pe)
Any help please? Thanks! |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Apr 2012 09:56 AM |
shirtid = "http://www.roblox.com/asset/?id=13343842" pantsid = "http://www.roblox.com/asset/?id=9735893"
function pe(np) local function ca(p) wait(3) if p:findFirstChild("Shirt") then p.Shirt.ShirtTemplate = shirtid elseif p:findFirstChild("Shirt") == nil then shirta = Instance.new("Shirt") shirta.Parent = p shirta.ShirtTemplate = shirtid end
if p:findFirstChild("Pants") then p.Pants.PantsTemplate = pantsid elseif p:findFirstChild("Pants") == nil then pantsa = Instance.new("Pants") pantsa.Parent = p pantsa.PantsTemplate = pantsid end
end np.CharacterAdded:connect(function() ca(np)) ca(np) end game.Players.PlayerAdded:connect(pe) |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2012 09:58 AM |
Oops!
shirtid = "http://www.roblox.com/asset/?id=13343842" pantsid = "http://www.roblox.com/asset/?id=9735893"
function pe(np) local function ca(p) wait(3) if p:findFirstChild("Shirt") then p.Shirt.ShirtTemplate = shirtid elseif p:findFirstChild("Shirt") == nil then shirta = Instance.new("Shirt") shirta.Parent = p shirta.ShirtTemplate = shirtid end
if p:findFirstChild("Pants") then p.Pants.PantsTemplate = pantsid elseif p:findFirstChild("Pants") == nil then pantsa = Instance.new("Pants") pantsa.Parent = p pantsa.PantsTemplate = pantsid end
end np.CharacterAdded:connect(function() ca(np) end) ca(np) end game.Players.PlayerAdded:connect(pe) |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2012 09:58 AM |
Oops! once more
shirtid = "http://www.roblox.com/asset/?id=13343842" pantsid = "http://www.roblox.com/asset/?id=9735893"
function pe(np) local function ca(p) wait(3) if p:findFirstChild("Shirt") then p.Shirt.ShirtTemplate = shirtid elseif p:findFirstChild("Shirt") == nil then shirta = Instance.new("Shirt") shirta.Parent = p shirta.ShirtTemplate = shirtid end
if p:findFirstChild("Pants") then p.Pants.PantsTemplate = pantsid elseif p:findFirstChild("Pants") == nil then pantsa = Instance.new("Pants") pantsa.Parent = p pantsa.PantsTemplate = pantsid end
end np.CharacterAdded:connect(function() ca(np.Character) end) end game.Players.PlayerAdded:connect(pe) |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2012 09:59 AM |
| What, might I ask, did you change? I'm just curious. |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2012 09:59 AM |
| Oh I see... do I need it in a LocalScript? |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2012 10:00 AM |
| Made ca a local function and changed np.CharacterAdded:connect(ca) to np.CharacterAdded:connect(function() ca(np.Character) end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 06 Apr 2012 10:07 AM |
Put this in 'StarterGui'.
while script.Parent.Parent.Character == nil do wait(0.1) end wait(3) local char = script.Parent.Parent.Character local pants = char:findFirstChild("Pants") local shirt = char:findFirstChild("Shirt") if not pants then pants = Instance.new("Pants", char) end if not shirt then shirt = Instance.new("Shirt", char) end pants.PantsTemplate = "http://www.roblox.com/asset/?id=9735893" shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=13343842" |
|
|
| Report Abuse |
|
|
|
| 06 Apr 2012 10:12 AM |
| It works in Play Solo and Local Server but not in a public one... Ah well I'll just leave this script. Thanks anyways :) |
|
|
| Report Abuse |
|
|