Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a functional scoreboard for a sports game?

Asked by 7 years ago

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?

1 answer

Log in to vote
0
Answered by 7 years ago

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
0
Where would this script and what values would be needed to make the script work? Ftlicious 16 — 7y
0
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. Conmmander 479 — 7y
Ad

Answer this question