Hello developers! I hope you are having a great day! I am trying to detect if the player wins or loses or not:
if plr.TimeTrials[name].Value < plr.TimeTrials[name].Value or plr.TimeTrials[name].Value == 0 then game.ReplicatedStorage.Music:FireClient(plr, "Win") plr.TimeTrials[name].Value = math.round(trialTime.Value) plr.PlayerGui.EndScreen.Trials.Improve.Text = "Your improved your time!" else game.ReplicatedStorage.Music:FireClient(plr, "Lose") plr.PlayerGui.EndScreen.Trials.Improve.Text = "You did not improve your time. " end
- The RemoteEvent you see plays the clients music, either win or lose. The losing music does indeed play.
- 9999999 is the correct OG time. I set it by using the Datastore Editor.
- It is functioning if as the player lost instead of won
(Yea, I improved my time…)
If you can help, please let me know. If you need more info, feel free to ask!