Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i award players points after a Game Round?

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

2 comments

0

It's easier if you provide the code for this, so we can edit it.

0

i just put it there for you

2 answers

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

2 comments

0

nope

0

welp im too lazy to sort it out XD

This discussion is preserved as it was. New answers, comments, and votes are closed.