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

Why does this sound not play?

Hi guys! Any ideas why this sound doesn't play? This is in a server script in the workspace:

game.Players.PlayerAdded:connect(function(Player)
Player.PlayerGui.XPCounter:Play()
end)

The sound is in the StarterGui. Thanks :)

1 comment

0

Try using WaitForChild() before playing the sound. Worth a shot, since everything needs a litle time to load

2 answers

Put in localscript and put localscript in startergui

wait(5)
plr = game.Players.LocalPlayer
plr.PlayerGui.XPCounter:Play() --Get into the players Gui

1 comment

0

Thanks, but I need to play it from the server script :/

Have you defined the sound? Like as local. Also to make a sound play you would do sound:play()

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