Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 07:14 PM |
I didn't know where to go to ask this, but can someone tell me what is wrong with this, it isn't working.
while true do wait(0.5) if script.Parent.Parent.Character.Humanoid.Health == 0 then script.Parent.Parent.TeamColor = game.Teams.Dead.TeamColor end end |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 07:14 PM |
| I am wanting it to where you die, you teleport back to the lobby spawn |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
| |
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
| |
|
|
| 25 Nov 2015 07:36 PM |
| of course, can you first tell me where the script is located? |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 07:38 PM |
In the workspace. Is there a specific place it needs to be placed?
|
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 07:39 PM |
yes is this script meant to be used on one character or every character? |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 07:44 PM |
| They are meant for all characters. Like when they die in the main map, they spawn back in the lobby. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 07:47 PM |
I assume you are able to fire this when all of the characters are dead. This will not work the way it should if you do not fire this after all characters die:
for i, v in pairs(game.Players:GetPlayers()) do v.TeamColor = game:GetService("Teams").Dead.TeamColor end
I also assume that each character respawns in the lobby once dead. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 07:50 PM |
never mind, I see what you want to do...
game.Players.LocalPlayer.Humanoid.Died:connect(function() game.Players.LocalPlayer.TeamColor = game:GetService("Teams").Dead.TeamColor end)
make sure that's in a LocalScript |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:03 PM |
| It didn't work.. Shouldn't it not be .Dead? Like make it 0 or something (I have no knowledge of scripting so I might sound like an idiot) |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 08:04 PM |
game.Players.LocalPlayer.Character.Humanoid.Died:connect(function() game.Players.LocalPlayer.TeamColor = game:GetService("Teams").Dead.TeamColor end)
he forgot character, |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:04 PM |
Let me re-explain..
So they all are teleported to the map (NOT IMPORTANT INFORMATION)
So once someone dies the person is teleported back to the lobby.
|
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 08:06 PM |
| @Togic scripters forum is for this stuff, you'll get a lot more responses they're from here :P |
|
|
| Report Abuse |
|
|
| |
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:12 PM |
Okay. Thanks for the script, But I tried it and it didn't work. |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 08:13 PM |
Make sure to put it inside of
game.StarterPlayer.PlayerScripts |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:19 PM |
| Still doesn't work ;-;-;-;-;-;-;-;--;-;- |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:23 PM |
So all I have to do is put
game.Players.LocalPlayer.Character.Humanoid.Died:connect(function() game.Players.LocalPlayer.TeamColor = game:GetService("Teams").Dead.TeamColor end) Into a local script And put into Player Scripts?
If so, I did, and doesn't work m8 'n' |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2015 08:24 PM |
try this
repeat wait() until game.Players.LocalPlayer.Character
game.Players.LocalPlayer.Character.Humanoid.Died:connect(function() game.Players.LocalPlayer.TeamColor = game:GetService("Teams").Dead.TeamColor end) |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:24 PM |
| NVM T WORKS :d:D;;;D;DDDDDD |
|
|
| Report Abuse |
|
|
microshue
|
  |
| Joined: 08 Jun 2012 |
| Total Posts: 23272 |
|
|
| 25 Nov 2015 08:25 PM |
.Died shouldnt be there. Replace died with 0
Gettin' Siggy With It |
|
|
| Report Abuse |
|
|
microshue
|
  |
| Joined: 08 Jun 2012 |
| Total Posts: 23272 |
|
|
| 25 Nov 2015 08:28 PM |
nvm if it works. i guess both would work
Gettin' Siggy With It |
|
|
| Report Abuse |
|
|
Veleen
|
  |
| Joined: 06 Jul 2015 |
| Total Posts: 1099 |
|
|
| 25 Nov 2015 08:50 PM |
| Yes keep learning! Tell him ! Yea What He Said! Yea Im strong. Pulls out jelly arms SIKE. Pulls out six pack and foot long biceps and triceps. |
|
|
| Report Abuse |
|
|
Togic
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 45 |
|
|
| 25 Nov 2015 08:54 PM |
| Well actually it works, but... it only works on me ;-; |
|
|
| Report Abuse |
|
|