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 » Scripters
Home Search
 

Unexplained Error in Children For Loop

Previous Thread :: Next Thread 
xSpectrumWolfx is not online. xSpectrumWolfx
Joined: 30 Nov 2011
Total Posts: 2858
23 Mar 2016 10:24 PM
http://prntscr.com/aj7zq1

function Animations:SwitchTopic(UI,Chosen,Input)
local UGroup = UI:GetChildren()
CustomizationTopic = Chosen
print(UGroup[1].Name)
if Input == "New" then
for index = 1, #UGroup do
if UGroup[index].Name ~= Chosen then
local UGroupY2 = UGroup[index].Position.Scale.Y
UGroup[index]:TweenPosition(UDim2.new(-0.1, 0, UGroupY2, -15), "Out", "Quad", 1, false)
end
end wait(1.2)
UI[Chosen]:TweenPosition(UDim2.new(0.02, 0, 0.28, -15), "Out", "Quad", 1, false)
end
end

This is a method inside of a module, and I can't figure out why the error is happening. The game throws me to the script with that line for some reason.
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
23 Mar 2016 10:48 PM
i dont see anything wrong with that piece of code.

did a quick for loop in studio with your structure. nothing wrong.

perhaps try:

for i,v in next, UGroup do

end


only suggestions i can can
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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