I want to award players Leaderboard Points after each round if they didnt die during the round? Ive tried so many things but they didnt work! Please Help!
Heres the game script with the Points awarder that doesnt work:
local base = game.Workspace.Lobby.Base local victory = game.Workspace.Victory local song = game.Workspace.OneWingedAngel while true do local MapTable = { game.Lighting.City; game.Lighting.Suburbs; game.Lighting.Boss } local Map = MapTable[math.random(1,#MapTable)] wait(10) local m = Instance.new("Message") m.Parent = game.Workspace m.Text = ("The Map chosen for this round is the "..Map.Name) local backup = Map:clone() wait(5) m.Text = "Loading Map" wait(5) m:remove() Map.Parent = game.Workspace Map:makeJoints() wait(1) base.CanCollide = false wait(2) base.CanCollide = true song:play() wait(120) Died = game.Players.Player.Instance.new('boolvalue') --starts here game.Players.Player.Character.Died:connect(died) Died = true if Died == false then game.Players.Player.leaderstats.Wins = game.Players.Player.leaderstats.Wins + 1 -- ends here end song:stop() local m = Instance.new("Message") m.Parent = game.Workspace m.Text = "Round Over!" victory:play() wait(5) victory:stop() m:remove() Map:remove() Map = backup:clone() Map:makeJoints() Map.Parent = game.Lighting end
No, Tochi is correct.
You're trying to increase a value. Therefore, you need to define the value. You're almost there with it though.
game.Players.Player.leaderstats.Wins.Value = game.Players.Player.leaderstats.Wins.Value + 1
Common Issue.
game.Players.Player.leaderstats.Wins.Value = game.Players.Player.leaderstats.Wins.Value + 1
You totally forgot the Wins.Value XD