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: I can't find what's wrong with this script

Previous Thread :: Next Thread 
TheDegree0 is not online. TheDegree0
Joined: 06 Jun 2011
Total Posts: 249
22 Feb 2013 03:18 PM
I made an script to make anchored everything that's in a model and I don't really understand why this script is not working. The code is right because it shows the message "It Works!" but it don't anchor anything.

m=Instance.new("Message") m.Parent=game.Workspace t={} u=game.Workspace.TheDegree0:getChildren() for i=1, #u do table.insert(t, u[i].Name) end t.Anchored=true m.Text="It Works!" wait(3) m:remove()

Thanks,
TheDegree0
Report Abuse
cart6157 is not online. cart6157
Joined: 28 Feb 2009
Total Posts: 2194
22 Feb 2013 03:28 PM
Because t is a table, and can't be 'anchored'.
Report Abuse
TheDegree0 is not online. TheDegree0
Joined: 06 Jun 2011
Total Posts: 249
22 Feb 2013 03:29 PM
And there isn't another way to do this?
Report Abuse
Maxanto is not online. Maxanto
Joined: 07 Feb 2010
Total Posts: 21
22 Feb 2013 03:55 PM
Its because I farted on it Im so sorry.
Report Abuse
bibo5o is not online. bibo5o
Joined: 17 Jan 2009
Total Posts: 414
22 Feb 2013 03:59 PM
well, there is a much simpler(to me) way.

model = game.Workspace(put the model address here)

d = model:GetChildren()
for i = 1, #d do
if d[i].className == "Part" then
d[i].Anchored = true
end
end
m = Instance.new("Message")
m.Text = "All anchored"
m.Parent = game.Workspace
wait(5)
m:Destroy()
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
22 Feb 2013 04:02 PM
Use table.concat(t, ",")
Report Abuse
TheDegree0 is not online. TheDegree0
Joined: 06 Jun 2011
Total Posts: 249
22 Feb 2013 04:43 PM
Thank you bibo05, I had not thought of that way of doing it.
Report Abuse
TheDegree0 is not online. TheDegree0
Joined: 06 Jun 2011
Total Posts: 249
22 Feb 2013 04:50 PM
bibo5o*
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