if plr.Finished.Value == true then wait(1) passedChecks.SendLapTime:FireServer(tonumber(numberText), plr) plr.PlayerGui.RaceGui.RaceStopwatch.Visible = false break end
passedChecks.SendLapTime.OnServerEvent:Connect(function(lapTime, plr) print(lapTime) plr.RacingStats.LapTime.Value = lapTime end)
I keep getting an error that says attempt to index number with 'RacingStats'. I don't understand. Please help me.
Player is the first argument for OnServerEvent, not the second.
Because you used it as the second, "plr" is being defined as the lap time and "lapTime" is being defined as the player. You should switch the two because .RacingStats
does not exist in a number.