Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is this script not working?

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 answer

✓ Accepted answer

You forgot to concatenate the string after Player.Name

1 comment

0

Thank you very much, it works now.

This discussion is preserved as it was. New answers, comments, and votes are closed.