Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make it so when a player on a team dies the total score of the other team goes up?

Asked by 8 years ago
player = game.Players.LocalPlayer
_G.Rangers_score=0
_G.Moondarkers_score=0
game.StarterGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text=("Moondarkers:").._G.Moondarkers_score
game.StarterGui.ScreenGui["Team score"].TextLabelRANGERS.Text=("Rangers:").._G.Rangers_score

while true do 
    wait (0.2)
    if player.Humanoid.Health <=0 and player.TeamColor==BrickColor.new("Storm blue") then
        _G.Rangers_score=_G.Rangers_score+1
    end

game.StarterGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text=("Moondarkers:").._G.Moondarkers_score
game.StarterGui.ScreenGui["Team score"].TextLabelRANGERS.Text=("Rangers:").._G.Rangers_score
end
print(_G.Rangers_score)

0
It doesn't work weirdraidercs35 0 — 8y
0
Put the code in a code block so that people can read it. Programmix 285 — 8y
0
i put it in a code block now weirdraidercs35 0 — 8y

2 answers

Log in to vote
0
Answered by
Vezious 310 Moderation Voter
8 years ago

Why not put,


Player Died (Player) if player.TeamColor==BrickColor.new("Storm blue") then _G.Rangers_score=_G.Rangers_score+1 else if Player.TeamColor== BrickColor.new("THE OTHER TEAMCOLOR HERE") then _G.OTHER TEAM HERE_score = _G.OTHER TEAM HERE_score

Hopefully you know this isn't the full one. You'll have to script it yourself but I told you how to script it.

Ad
Log in to vote
-1
Answered by 8 years ago
player = game.Players.LocalPlayer _G.Rangers_score=0 _G.Moondarkers_score=0 game.StarterGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text=("Moondarkers:").._G.Moondarkers_score game.StarterGui.ScreenGui["Team score"].TextLabelRANGERS.Text=("Rangers:").._G.Rangers_score

while true do wait (0.2) if player.Humanoid.Health <=0 and player.TeamColor==BrickColor.new("Storm blue") then _G.Rangers_score=_G.Rangers_score+1 end

game.StarterGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text=("Moondarkers:").._G.Moondarkers_score game.StarterGui.ScreenGui["Team score"].TextLabelRANGERS.Text=("Rangers:").._G.Rangers_score end print(_G.Rangers_score)

0
this isn't a threaded forum post, edit your original question instead of trying to answer it. 1waffle1 2908 — 8y
0
I forgot I could edit. weirdraidercs35 0 — 8y
0
@weirdraidercs35 Then edit your question and remove this answer.. LetThereBeCode 360 — 8y

Answer this question