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

How do i change a name of a leaderboard?

Why won't it work?

if 2 + 2 ==4 then
game.Leaderboard.name = "Score"
end

The output brings up Leaderboard is not a valid member of DataModel.And i don't know what that means.Help!

1 answer

✓ Accepted answer

The script doesn't recognise what "Leaderboard" means. Try this script:

function onPlayerEntered(newPlayer)

	local stats = Instance.new("IntValue")
	stats.Name = "leaderstats"

	local cash = Instance.new("IntValue")
	cash.Name = "Score"
	cash.Value = 0

	cash.Parent = stats
	stats.Parent = newPlayer
end

game.Players.ChildAdded:connect(onPlayerEntered)

Hope it helps !

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