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: Delete all welds in a vehicle

Previous Thread :: Next Thread 
TomsGames is not online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
14 Mar 2014 10:53 AM
g = game.ReplicatedStorage.PlayGreenJeep.Parts:GetChildren()

for i = 1, #g do
f = g[i]:GetChildren()
if f ~= nil then
for i = 1, #f do
print(f[i])
if f[i].ClassName =="ManualWeld" then
f[i]:destroy()
end
end
end
end


Basically, loads of bricks have some manual welds in them. It iterates through the children of the bricks successfully, but it only prints stuff like "Fire" or "Smoke".. Like it doesn't interact with the manual welds. How can I remove them without doing it manually?
Report Abuse
TomsGames is not online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
14 Mar 2014 12:14 PM
Bump
Report Abuse
TomsGames is not online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
14 Mar 2014 01:33 PM
bump
Report Abuse
TomsGames is not online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
14 Mar 2014 01:43 PM
Is this rly so hard to answer xD
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
14 Mar 2014 01:51 PM
:Destroy has to be capital?

Could be wrong, that's just how I've always done it.

#Scripter
Report Abuse
TomsGames is not online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
14 Mar 2014 01:52 PM
It doesn't affect it.

The error is that it doesn't find the "ManualWelds". It finds every other child. Like.. What?
Report Abuse
UnStunned is not online. UnStunned
Joined: 14 Jun 2012
Total Posts: 122
14 Mar 2014 02:08 PM
Not necessary
this is what it can be like-
:Destroy()
prefer capital because its given like than in object browser.
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