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

Leaderstats resets once more after chatting, is anything wrong?

Asked by 4 years ago

So, im making a leaderstat reset button that consists of 1 remote event. Every time you push the button, it resets your Leaderstat. But after clicking the button, when you chat ingame, it resets the leaderstat once more.

Main Script: (Script)

game.ReplicatedStorage.Reset.OnServerEvent:Connect(function(player)
    player.leaderstats.Kills.Value = 0
    player.leaderstats.Deaths.Value = 0
    player.leaderstats.Ping.Value = 0
end)

Button script: (Localscript)

script.Parent.MouseButton1Up:Connect(function()
    game.ReplicatedStorage.Reset:FireServer()
    script.Parent.Parent.Visible = false
    script.Parent.Parent.Cooldown.Visible = true
    wait(60)
    script.Parent.Parent.Cooldown.Visible = false
end)
0
It resets after player chatted? Feelings_La 399 — 4y
0
yeah\ IceInterception 0 — 4y

Answer this question