01 | function PlacePictures() |
02 | local num = 0.05 |
03 | local num 2 = 50 -- +200 |
04 | local picture = game.Lighting.Picture |
05 | local players = game.Players:GetChildren() |
06 | for i,v in pairs (players) do |
07 | local pictureclone = picture:clone() |
08 | pictureclone.Parent = game.Workspace.MemoryWall.Part.SurfaceGui |
09 | pictureclone.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=420&y=420&username=" ..game.Players.LocalPlayer.Name |
10 | pictureclone.Position = UDim 2. new( 0 , num 2 , num, 0 ) |
11 | num = num + 0.25 |
12 | end |
13 | end |
Okay, so I made this code so that a wall would have 100x100 size picture's of everyone on the server. How would i make it so that for every four pictures(pictureclones), num2 would increase by 200? So that the pictures would be in rows of 4
The 'i' variable in the 'for i,v in ipairs() do' is the count of the player. Check for this:
Example 1
1 | if i ~ = 0 and i% 4 = = 0 then |
This checks if I isn't 0 and that the remainder of i/4 is 0. Then, num2 = num2 + 200.
the more u know