1. BrickPlanet Forum
  2. Game & Scripting Discussion
  3. How to change leaderboard stats?
How to change leaderboard stats?
JaxonFerrero1
Level 4
Joined Nov 18th 2022
Posts 42
Posted Mar 10th 2023 at 7:38PM
I put a part touched script so whenever you touch it it sets a stat. It gives this error

(Log) Script error: [string "Script"]:8: attempt to call field 'SetPlayerColumnValue' (a nil value) Lua (at <no source>)

This is my code

game.Leaderboard.SetPlayerColumnValue(player.Name,"Spawned",9)
snail
Level 9
Joined Nov 12th 2022
Posts 88
Posted Mar 11th 2023 at 6:22AM
SetPlayerColumnValue()'s first argument is a Player instance and not a player's name
JaxonFerrero1
Level 4
Joined Nov 18th 2022
Posts 42
Posted Mar 11th 2023 at 11:37PM
I still get the same error
JaxonFerrero1
Level 4
Joined Nov 18th 2022
Posts 42
Posted Mar 12th 2023 at 1:34AM
Got it to work nvm

Search Forum

Thread Info

Replies
3
Views
19
Created Mar 10th 2023
Last Reply Mar 12th 2023