I am working on a new basketball game but I am new to ROBLOX Lua. Can someone give me tips with ROBLOX Lua and/or making a functional scoreboard?
✓ ANSWER ACCEPTED
How do you make a functional scoreboard for a sports game?
1 answer
✓ Accepted answer
Well, depending on how you script it you could have a central script with some values like
local TeamScore = {
Team1 = 0
Team2 = 0
}
function PointScored(Team, Points)
local TeamVar = TeamScore[Team]
TeamVar = TeamVar + tonum(Points)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Where would this script and what values would be needed to make the script work?
This script would go wereever you keep your scripts in your game. For example, I like to have one central script inside server script service, and then some module scripts inside a folder called Library. the values are all there. You see kind of new to LUA, so I'd suggest working with simple stuff first.