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

How can i make it play sound?

Asked by 8 years ago

How can i make it play the sound when credits have increased and not play when it has decreased.

local player = game.Players.LocalPlayer

player.leaderstats.Credits.Changed:connect(function()
script.Parent.CoinCollect:Play()
script.Parent.TextLabel.Text = "Credits: "..player.leaderstats.Credits.Value
end)

0
Why not just play the audio when the script you are using it for changes their credits, as you know the credits would be going up? Like, in the same script that adds a credit, play the sound. shayner32 478 — 8y

Answer this question