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
 

Changed Event Help

Previous Thread :: Next Thread 
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
21 Jan 2014 12:52 AM
How would I script this Changed Event so that it applies to all Parts inside the Model?


Model:GetChildren().Changed:connect(function(Property)
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
21 Jan 2014 01:12 AM
help
Report Abuse
michael82 is not online. michael82
Joined: 30 Aug 2008
Total Posts: 101
21 Jan 2014 01:13 AM
Why not refer it to one name inside the model. So, basically you name all the parts in that model the same name boom there you go.
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
21 Jan 2014 01:13 AM
that wont work with what i'm scripting
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 01:15 AM
for i,v in pairs(script.Parent:GetChildren()) do
v.Changed:connect(function()
print(v.Name.. " changed")
end)
end
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 01:16 AM
Except don't put the script inside the same model, because it will error.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 01:21 AM
^

scratch that
Report Abuse
iValianT is not online. iValianT
Joined: 21 Aug 2010
Total Posts: 58381
21 Jan 2014 01:22 AM
thanks azarth
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
21 Jan 2014 01:37 AM
--Azarth's won't work and he knows why but he's close:


for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName ~="Script" then
v.Changed:connect(function()
--code
end)
end
end


--Now this should work I RBI k.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 01:41 AM
Works fine with scripts, that's why I redacted what I said.
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