|
| 01 Jan 2015 02:18 PM |
How do you make a script that chooses two players that aren't in battle and put's them in battle?
--
function playervalue(plr) local inbattle = Instance.new("BoolValue") swordfighting battle or not inbattle.Value = false inbattle.Name = "InBattle" inbattle.Parent = plr end
function minisword() wait(.1) local maplocation = game.Lighting.MiniSwordMaps local players = game.Players:GetChildren() local maps = maplocation:GetChildren() local num = math.random(1,#maps) local mapchosen = maps[num]
--I'm really not sure about what to do here. I'm probably going to delete this loop below while true do wait(1) for i=1,#players do if players[i].InBattle == false then end end end end
game.Players.PlayerAdded:connect(playervalue) minisword()
|
|
|
| Report Abuse |
|
| |