|
| 12 Oct 2015 10:06 PM |
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() if player.TeamColor==BrickColor.new("Storm blue") then _G.Rangers_score=_G.Rangers_score+1 end if player.TeamColor==BrickColor.new("Moss") then _G.Moondarkers_score=_G.Moondarkers_score+1 end --print(player.Name .. " has died!") end) end) end) game.StarterGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text=("Moondarkers:").._G.Moondarkers_score game.StarterGui.ScreenGui["Team score"].TextLabelRANGERS.Text=("Rangers:").._G.Rangers_score
|
|
|
| Report Abuse |
|
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 12 Oct 2015 10:10 PM |
If its on the leaderboard, something like
ValueNameHere.Value=ValueNameHere.Value+num
gcmi lg lpxtlc; Decode it with Vigenere Cipher, keyword is Doge, if you dare >:) |
|
|
| Report Abuse |
|
|
| |
|
Dogejia
|
  |
| Joined: 08 Feb 2012 |
| Total Posts: 1873 |
|
|
| 12 Oct 2015 10:15 PM |
Do you have an INT, or any value?
gcmi lg lpxtlc; Decode it with Vigenere Cipher, keyword is Doge, if you dare >:) |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Oct 2015 10:19 PM |
| should i add an intValue ? |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2015 10:20 PM |
Only if you're using the built in leaderboard system.
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2015 10:28 PM |
oh. Im using a gui. So how would I fix my code if I wasn't using a leaderboard. |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2015 10:55 PM |
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() if player.TeamColor.Name == "Storm blue" then _G.Rangers_score = _G.Rangers_score + 1 end if player.TeamColor.Name == "Moss" then _G.Moondarkers_score = _G.Moondarkers_score + 1 end updateLeaderboard() end) end) end)
function updateLeaderboard() for _, player in next, game.Players:GetPlayers() do if player.StarterGui:FindFirstChild("ScreenGui") then player.StarterGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text = "Moondarkers: " .. _G.Moondarkers_score player.StarterGui.ScreenGui["Team score"].TextLabelRANGERS.Text = "Rangers: " .. _G.Rangers_score end end end
This really isn't an efficient way to do things but it should work. I didn't make it better because I don't know how your system is set up.
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2015 10:58 PM |
Ahhhhh wait I had a brainfart, I said StarteGui instead of PlayerGui lol. Replace updateLeaderboard() with this function
function updateLeaderboard() for _, player in next, game.Players:GetPlayers() do if player.PlayerGui:FindFirstChild("ScreenGui") then player.PlayerGui.ScreenGui["Team score"].TextLabelMOONDARKERS.Text = "Moondarkers: " .. _G.Moondarkers_score player.PlayerGui.ScreenGui["Team score"].TextLabelRANGERS.Text = "Rangers: " .. _G.Rangers_score end end end
-The [Guy] |
|
|
| Report Abuse |
|
|
|
| 12 Oct 2015 11:46 PM |
| for some reason that code does not work for me. |
|
|
| Report Abuse |
|
|