I am trying to give everyone a target and a person targeting them, so person a might be targeting person b but is being targeted by person c. I have tried this, I do not believe it will work, but I can't test it in studio, because it requires multiple people. I have a problem because what if person a's target is person b and person b's target is person a and there are only 3 people in the server, person C will have no one to target. I can't make it so you can't target your hunter otherwise the final two won't be able to hurt each other. This is my script:
--[[Values]]
--[[Tables]]
Players = game.Players:GetChildren() -- Table of players
--[[Checking alive players]]
if player.TeamColor ~= "Grey" then
Colours = {
BrickColor.new("Sand red"),
BrickColor.new("Sand blue"),
BrickColor.new("Sand green"),
BrickColor.new("New yeller"),
BrickColor.new("Br. yellowish orange"),
BrickColor.new("Lavender"),
BrickColor.new("Dusty Rose"),
BrickColor.new("Deep blue")
}
--[[Colouring]]
function Assign()
for a = 1, Players do
a.Character.Parent.Torso.BrickColor = Colours[a]
end
end
--[[Current players (The players still alive)]]
function Alive()
Current = Players
for i in Current do
if i.TeamColor ~= "Grey" then
Current.remove(i)-- No idea how to use this
end
end
if #Current == 1 then
Win()
elseif #Current == 0 then
Target() -- Start again
end
end
--[[Selecting Hunters/Targets]]
function Select()
b = Players[math.random(1, Current)] -- Random player
if a ~= b and a. Target == nil then
a.Target.Value = b.Name
b.Hunter.Value = a.Name
print (a.."/'s target is:"..b)
print (b.."\'s hunter is:"..a)
elseif a == b then
Select()
end
end
--[[Win]]
function Win()
print (Current[1].." won!")
Target()
end
--[[Target, Hunter]]
function Target()
Assign()
Alive()
for a = 1, Current do
Select()
end
end
wait(5)
Target()

2 comments
You can test it with multiple people in studio. Just go under the 'Test' tab in studio, then find the "Start" button. Click it and it will start a server with the number of players specified in the box next to it. http://wiki.roblox.com/index.php?title=Studio#Test_2
Thank you, I wasn't aware