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 » Game Design
Home Search
 

Re: Swordfighting Script

Previous Thread :: Next Thread 
powerfultyphlosion is not online. powerfultyphlosion
Joined: 05 Jul 2012
Total Posts: 379
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
powerfultyphlosion is not online. powerfultyphlosion
Joined: 05 Jul 2012
Total Posts: 379
01 Jan 2015 02:36 PM
[BUMP]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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