KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 08:16 AM |
One versus one Sword Fighting Tournament Script.
I need a script like the one they use in SFT to pic two random players to fight against each other, while the others sepctate.
Thanks. |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
| |
|
|
| 29 Mar 2015 08:31 AM |
local players = game.Players:GetChildren()) local randomplayer1 = players[math.random(1, #players)] local randomplayer2 repeat randomplayer2 = players[math.random(1, #players)] until randomplayer2 ~= randomplayer1 --Add this line to avoid that the script takes twice the same player (obviously, you can't duel yourself...) |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 08:56 AM |
| That's nice and all, but it doesn't teleport them, which is fine, but it's expecting an identifier on line 1 but instead got ")" |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 08:58 AM |
| Oh, never mind, i fixed the identifier. |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 09:03 AM |
| Still needs to teleport the players, I don't really know how to incorporate that into the script. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 29 Mar 2015 09:05 AM |
:MoveTo () is your friend wiki.roblox.com |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
| |
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
| |
|
|
| 29 Mar 2015 09:14 AM |
wiki.roblox.com
There you will find what you need. |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 09:28 AM |
Okay. I have
"while true do wait(5) game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(70.5, 119.1, 79))
wait(5) game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(35, 175, 79)) end"
But, what do I replace to get the random player (1) to teleport? |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
| |
|
roblock59
|
  |
| Joined: 30 Jul 2010 |
| Total Posts: 155 |
|
|
| 29 Mar 2015 09:34 AM |
for i,v in pairs(game.Players:GetPlayers()) do v.Character.Torso.CFrame = game.Workspace.Target.CFrame |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
| |
|
roblock59
|
  |
| Joined: 30 Jul 2010 |
| Total Posts: 155 |
|
|
| 29 Mar 2015 09:38 AM |
| lol you cant get a player from workspace ^ noob |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 09:41 AM |
Then why is my script working?
I just need the random player to be teleported, right now I'm already calling on game.Workspace.Player.CFrame, and it's working fine. |
|
|
| Report Abuse |
|
|
roblock59
|
  |
| Joined: 30 Jul 2010 |
| Total Posts: 155 |
|
|
| 29 Mar 2015 09:42 AM |
| doubt it ^ and please stop asking people to script for you |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 09:43 AM |
| If you doubt me then play the game dumb dumb. |
|
|
| Report Abuse |
|
|
roblock59
|
  |
| Joined: 30 Jul 2010 |
| Total Posts: 155 |
|
|
| 29 Mar 2015 09:44 AM |
| im on your game doesnt work lol. |
|
|
| Report Abuse |
|
|
KasakuKun
|
  |
| Joined: 13 Jun 2011 |
| Total Posts: 1060 |
|
|
| 29 Mar 2015 09:47 AM |
But in test mode it works?
Blah.
|
|
|
| Report Abuse |
|
|
|
| 29 Mar 2015 10:11 AM |
| You're named player in test mode, you're lucky you made it this far without being flamed. |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 29 Mar 2015 10:44 AM |
LET THE FLAME BEGIN
We aren't just gonna script all if for you. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2015 12:54 PM |
local players = game.Players:GetChildren()) local spawn1 = identify spawn 1 here (part) local spawn2 = identify spawn 2 here (part) local randomplayer1 = players[math.random(1, #players)] local randomplayer2 repeat randomplayer2 = players[math.random(1, #players)] until randomplayer2 ~= randomplayer1 randomplayer1.Character:MoveTo(spawn1.Position+Vector3.new(0, 3, 0) randomplayer2.Character:MoveTo(spawn2.Position+Vector3.new(0, 3, 0) |
|
|
| Report Abuse |
|
|