So the script is supposed to react to when a player gets a certain amount of a particular stat. However, the script doesn't perform anything at all. Output gave me nothing. Can someone please help me? Here's the script:
Player = script.Parent.Parent
while not Player:findFirstChild("leaderstats") do wait(1) end --loop wait until leaderstats load
while not Player.leaderstats:findFirstChild("Streak") do wait(1) end -- same for streak
Player.leaderstats.Streak.Changed:connect(function(v) --creating this connection line assigns the function inside of it to fire every time Streak changes its value; instead of just the one time.
if v == 15 then
game.Workspace.Text.Value = ""..Player.Name" is going all out with a 15 Killstreak!"
game.Workspace.YOLO:play()
wait(10)
game.Workspace.Text.Value = ""
end
end)

1 comment
Thank you very much, it works now.