Why doesnt this work?:
local Players = game:GetService("Players")
local name = "yourfuturepilot2"
Players.OnPlayerAdded:Connect(function(player)
print("yes")
local audio = player.PlayerScripts.audio
if player.Name == name then
audio:Play()
print("audio has played for player")
end
end)
It is in a local script in starterplayerscripts, and the audio is in the same place. Nothing is showing up in output, unfortunately. this is supposed to play music for someone with a specific name that enters the game. I know I am probably just being an idiot, but I am a beginner so just go easy on me.

3 comments
Change Players.OnPlayerAdded to game.Players.PlayerAdded instead.
Tried that before this post, it didn't work.
Unfortunately, PlayersAdded wont work for what @Dovydas1118 said, I believe, as it is local. Also, do not use your username. Use your userID. This will never change, so you can change your name without changing your code. Your account userID is 125293735. I found this in the URL for your profile. Tachankas greatest.