How to make sure no BrickColor is repeated when changing a group of brick's BrickColor randomly?
02 | local list = game.ServerStorage.Colors:GetChildren() |
03 | local list 2 = game.Workspace.Colors 4. pads:GetChildren() |
04 | local pm = game.ServerStorage.pm.Value |
05 | function onChatted(msg, recipient, speaker) |
09 | local source = string.lower(speaker.Name) |
10 | msg = string.lower(msg) |
12 | if (msg = = ":randomize" ) then |
16 | list 2 [ math.random(#list 2 ) ] .BrickColor = list [ math.random(#list) ] .Value |
25 | function onPlayerEntered(newPlayer) |
26 | newPlayer.Chatted:connect( function (msg, recipient) onChatted(msg, recipient, newPlayer) end ) |
29 | game.Players.ChildAdded:connect(onPlayerEntered) |
The script I have works fine but it has 1 problem. I do not want the color to be repeated onto any of the bricks. I tried using variables in a earlier version of this script but that did not work.
Thanks if you decide to help out, thanks if you just read this.
- UltChowsk