Hey, I'm making a game and there are three teams, Gods, Mortals, and Mortal Heroes. I want the Mortal Heroes and Mortals to still have the usual 100 health but I want the player on the Gods team to have 300 health ONCE HE JOINS THE TEAM. This is in caps because it can't make him reset, it has to give him the health without him resetting. The health needs to be given to him right when he switches onto the Gods team (which he does by stepping on a spawn point) without him having to reset or die in any way. This was my attempt at it, it is fairly simple but I can tell it didn't work, what should I change about it to make it work?
if player.TeamColor == "Lapis" then
player.Health = 300
end
Note: The team color for Gods is Lapis. The color for Mortals is New Yeller. And the color for Mortal Heroes is Really Red, just in case you need any of that information. Thanks, Skyraider5

11 comments
Yeah I just updated this, so just to check, if you're seeing this for the first time, refresh the page.
It didn't work, is there anything else i would have to add anywhere to make the script work? Also, where should I put the script?
I'd change line 4 to: if player.Team == "Lapis" then
@Skyraider5 it's strange it didn't work, but listen, you gotta use a LOCALSCRIPT in the Workspace. If it won't work still, then remove the loop (remove the while wait() do and the second end couting from down)
Ok, I put it in a local script in the workspace but is there anything else I would need to add for it to work, like a humanoid or an IntValue or something? Or would the script alone do it?
You don't need to do anything. The local script is working.
ok so if I just put the local script in the workspace and do nothing else it should work?
Yes
Hey OtcPedroo, Thanks for the help but whenever I test it, the God player still has only 100 health. If I go on test mode and then look on the explorer at the model that is my player, I can go to the humanoid inside that model and change it that way but the script doesn't change anyone's health. Any other ideas?
Ok... god is the team name. but what's that team's color? Are you sure its lapis?
ALRIGHT IK! I just edited the script, it will work now @Skyraider5!!! #Tested