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 » Roblox » Help (Technical Support and Account Issues)
Home Search
 

Re: Can you correct this script?

Previous Thread :: Next Thread 
Togic is not online. 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 is not online. 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 is not online. Togic
Joined: 12 Apr 2015
Total Posts: 45
25 Nov 2015 07:19 PM
b
Report Abuse
Togic is not online. Togic
Joined: 12 Apr 2015
Total Posts: 45
25 Nov 2015 07:20 PM
b2
Report Abuse
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
25 Nov 2015 07:36 PM
of course, can you first tell me where the script is located?
Report Abuse
Togic is not online. 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
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
25 Nov 2015 07:39 PM
yes
is this script meant to be used on one character or every character?
Report Abuse
Togic is not online. 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
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
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
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
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 is not online. 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
ninjakitty78 is not online. ninjakitty78
Joined: 28 Dec 2012
Total Posts: 12
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 is not online. 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
ninjakitty78 is not online. ninjakitty78
Joined: 28 Dec 2012
Total Posts: 12
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
ninjakitty78 is not online. ninjakitty78
Joined: 28 Dec 2012
Total Posts: 12
25 Nov 2015 08:07 PM
there***
Report Abuse
Togic is not online. 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
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
25 Nov 2015 08:13 PM
Make sure to put it inside of

game.StarterPlayer.PlayerScripts
Report Abuse
Togic is not online. Togic
Joined: 12 Apr 2015
Total Posts: 45
25 Nov 2015 08:19 PM
Still doesn't work ;-;-;-;-;-;-;-;--;-;-
Report Abuse
Togic is not online. 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
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
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 is not online. Togic
Joined: 12 Apr 2015
Total Posts: 45
25 Nov 2015 08:24 PM
NVM T WORKS :d:D;;;D;DDDDDD
Report Abuse
microshue is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » Help (Technical Support and Account Issues)
   
 
   
  • 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