generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Works in solo but not on online

Previous Thread :: Next Thread 
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 08:10 PM
lo = script.Parent
a = lo:FindFirstChild("Script")
if a then
a:Destroy()
end
z = lo.Parent.Character:FindFirstChild("Shirt")
if z then
z.ShirtTemplate = ""
end
o = lo.Parent.Character:FindFirstChild("Pants")
if o then
o.PantsTemplate = ""
end
p = lo.Parent.Character:FindFirstChild("HairCore")
if p then
p:Destroy()
end
q = lo.Parent.Character:FindFirstChild("GlassesCore")
if q then
q:Destroy()
end
print("Cleared")















char = script.Parent.Parent.Character
if char:FindFirstChild("Shirt")==nil then
s = Instance.new("Shirt")
s.Name ="Shirt"
s.Parent = char

if char:FindFirstChild("Pants")==nil then
c = Instance.new("Pants")
c.Name = "Pants"
c.Parent = char
print("Passed1")
end
end
repeat wait() until char:FindFirstChild("Shirt").ShirtTemplate == ""
repeat wait() until char:FindFirstChild("Pants").PantsTemplate == ""
print("Passed 2")
local hair = Instance.new("Part")
hair.Name = "HairCore"
hair.BrickColor = BrickColor.new("Reddish brown")
hair.Parent = char
print("Passed3")
local hairmesh = Instance.new("FileMesh")
hairmesh.Name = "HairMesh"
hairmesh.MeshId = "http://www.roblox.com/asset/?id=16627529"
hairmesh.Scale = Vector3.new(1.05, 1.05, 1.05)
hairmesh.Parent = hair
print("Passed4")
local shirt = char:FindFirstChild("Shirt")
if shirt then
shirt.ShirtTemplate = "rbxassetid://13343842"
shirt.Parent = char
print("Passed5")
local pants = char:FindFirstChild("Pants")
if pants then
pants.PantsTemplate = "rbxassetid://7307783"
pants.Parent = char
print("Passed6")
local weld = Instance.new("Weld")
weld.Part0 = char["Head"]
weld.Part1 = hair
weld.C1 = CFrame.Angles(0,0,0) *CFrame.new(0,-0.5,0)
weld.Parent = hair
print("Passed7")
local face = char.Head:FindFirstChild("face")
if face then
face.Texture = "http://www.roblox.com/asset/?id=100952572"
face.Name = "face"
face.Parent = char:WaitForChild("Head")
print("Passed8")
local gla = Instance.new("Part")
gla.BrickColor = BrickColor.new("Really black")
gla.Name = "GlassesCore"
gla.Parent = char
local gm = Instance.new("FileMesh")
gm.MeshId = "http://www.roblox.com/asset/?id=30166087"
gm.Parent = gla
local w2 = Instance.new("Weld")
w2.Part0 = char["Head"]
w2.Part1 = gla
w2.C1 = CFrame.Angles(0,0,0) *CFrame.new(0,-.6,.3)
w2.Parent = gla
print("Passed9")
end
end
end

The shirt part and ppants part
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
16 Jun 2014 08:12 PM
Maybe when you're online, the clothes don't load right away. Add something that will wait for the shirt and pants to load.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 08:27 PM
^How would I do that?
Report Abuse
PerpetualMovement is not online. PerpetualMovement
Joined: 04 Dec 2012
Total Posts: 1001
16 Jun 2014 08:29 PM
repeat wait() until characterlocation:FindFirstChild("Shirt")
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 08:33 PM
That didn't work.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 08:40 PM
helpits in a normal script.
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 08:43 PM
character.ChildAdded:connect(function(child)
if child.Name == "" then
child:Destroy()
elseif child.Name == "" then
child:Destroy()
end
end)
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 08:46 PM
^Where would I put this?
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
16 Jun 2014 08:47 PM
In your script, define character and adjust the if then statements.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
16 Jun 2014 09:03 PM
Still doesn't work...
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 12:02 PM
Bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 12:27 PM
Please help..
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 12:46 PM
bump
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 01:02 PM
help
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 03:08 PM
help
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 06:31 PM
Please, I've been waiting so long.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
17 Jun 2014 06:38 PM
Please..
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image