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
 

Re: Good way to Reference more than one UI object?

Previous Thread :: Next Thread 
DecimaPrism is not online. DecimaPrism
Joined: 28 Aug 2014
Total Posts: 95
12 Dec 2016 12:22 PM
Hello!, Im trying to Reference more than one UI object, "Slot_One"

but I have four total slots and I was wondering if there is a way to reference all 4 of them intead of creating function for each slot individually.
Report Abuse
DecimaPrism is not online. DecimaPrism
Joined: 28 Aug 2014
Total Posts: 95
12 Dec 2016 12:27 PM
I should also note,

if Slot_One.Item.Value ~= "None" then


So, if the slots are in use, then make it look for another slot that is open, of the 4.


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
12 Dec 2016 01:40 PM
You can use tables.


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
12 Dec 2016 01:41 PM
##################################################################################################################################
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
12 Dec 2016 01:42 PM
To add on to what Time said:

local slo = {s, s2, s3, s4}

for i,v in pairs(slo) do
--do something to each slot
end

(Sorry roblox censored me probably because of the variables)
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