#Need help rapidly updating number to client

1 messages · Page 1 of 1 (latest)

ocean spindle
#

Hello! I'm sure this will be a minor fix, but I am making a scoring system based on how long someone is being flung/flying. I want the point counter from the server to reflect in the client GUI but don't know exactly how to do so. I'm trying to connect the score from the module script to the client with a remote event but don't know how to rapidly update it.
Module script:

    local score = 0
    pointsEvent:FireClient(player, score)
    
    while victimRootPart.Velocity.Magnitude >= 0.1 do
        score += 1
        print(score)
        task.wait()
    end
    print("Loop finished, awarding points")
end

Local script:

pointsEvent.OnClientEvent:Connect(function(score)
    
    pointsGUI.Enabled = true
    pointAmount.Text = score

end)

Thanks for the help as always!

gloomy sapphire