need help on updating scores on text labels after a round ends
(after a round finished the labels are staying default and not updating)
im using a localscript on the screengui with the script below also using remove event:
local remoteEvent = game.ReplicatedStorage:WaitForChild(“UpdatePointsEvent”)
local function updatePoints(bluePoints, redPoints)
local screenGui = script.Parent – Altere para a referência correta ao ScreenGui
local bluePointsLabel = screenGui:WaitForChild(“BluePointsLabel”)
local redPointsLabel = screenGui:WaitForChild(“RedPointsLabel”) –
bluePointsLabel.Text = ": " … bluePoints
redPointsLabel.Text = ": " … redPoints
end
remoteEvent.OnClientEvent:Connect(updatePoints)
how im adding points in server script service:
if not roundEnded then
roundEnded = true
print(“Red Team won.”)
addPointsToTeam(“RedTeam”)
movePlayersToLobby()
respawnPlayers()