Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 29 Oct 2015 02:54 AM |
Hi guys, I was making a 1v1 system, when another unusual error popped up:
The purpose of this script is to TP the players into the arena, then freeze them (In order for them to prevent moving) and then once the timer reaches zero, unfreeze them. Now, I wanted to make a round system (So that you could configure how many rounds a certain match should have) it works fine, but I want it so that once the player RESPAWNS, He/she tps back into the arena. For some really weird reason, Roblox READS those lines without ANY error, it even PRINTS what I've put in there. But it doesn't tp the players back in. Output is what is expected, the only problem is that it doesn't teleport the players back in. For some weird reason.
while config.RoundNumber.Value ~= 0 do wait() while Player1:WaitForChild("Humanoid").Health ~= 0 and Player2:WaitForChild("Humanoid").Health ~= 0 do wait() announce.Text = "Game in progress with "..Player1.Name.." and "..Player2.Name.." with "..config.RoundNumber.Value.." rounds" end if Player1.Humanoid.Health == 0 then announce.Text = Player2.Name.." wins this round" config.RoundNumber.Value = config.RoundNumber.Value - 1 wait(12) else announce.Text = Player1.Name.." wins this round" config.RoundNumber.Value = config.RoundNumber.Value - 1 wait(12) end print("[D] MasterScript: Clearing backpacks") Player1plr.Backpack:ClearAllChildren() Player2plr.Backpack:ClearAllChildren() print("[D] MasterScript: Backpacks cleared") Player1:MoveTo(Vector3.new(1,1,1)) Player2:MoveTo(Vector3.new(1,1,1)) wait() Player1:MoveTo(game.Workspace.Plate1_teleport.Position) -- PROBLEMATIC LINE print("[D] MasterScript: Successfully moved Player1 back") Player2:MoveTo(game.Workspace.Plate2_teleport.Position) print("[D] MasterScript: Successfully moved Player2 back") Player1.Torso.Anchored = true Player2.Torso.Anchored = true for i = 5, 0, -1 do wait(1) announce.Text = i.." second intermission" end Player1.Torso.Anchored = false Player2.Torso.Anchored = false announce.Text = "Fight!" local Player1Sword = SwordTemplate:Clone() local Player2Sword = SwordTemplate:Clone() Player1Sword.Parent = Player1plr.Backpack Player2Sword.Parent = Player2plr.Backpack end end end
workspace.Plate1.Touched:connect(main) workspace.Plate2.Touched:connect(main)
I'm just flabbergasted now. I don't understand what's going wrong with it. Maybe it's my stupidity or something, but I'm not giving up so quick. I need your help though. Please help me, This is getting ridiculous.
|
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 29 Oct 2015 03:05 AM |
| Come on guys. I need a little help here! |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 29 Oct 2015 03:15 AM |
| Come on guys! This is getting incredibly frustrating! |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 29 Oct 2015 04:14 AM |
| Can't you help a person in need here? |
|
|
| Report Abuse |
|
|
PiraxeZ
|
  |
| Joined: 06 Sep 2014 |
| Total Posts: 4254 |
|
|
| 29 Oct 2015 04:44 AM |
| Clone or do vector3.new now |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 29 Oct 2015 05:29 AM |
| Apparently when a player dies, the old reference to that player stops (That's why it wouldn't work after a player dies) so I only had to search for the player again once the round ends. problem fixed. Thanks anyway. |
|
|
| Report Abuse |
|
|