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

Why does this sound not play?

Asked by 9 years ago

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 :)

0
Try using `WaitForChild()` before playing the sound. Worth a shot, since everything needs a litle time to load Necrorave 560 — 9y

2 answers

Log in to vote
0
Answered by
FiredDusk 1466 Moderation Voter
9 years ago

Put in localscript and put localscript in startergui

wait(5)
plr = game.Players.LocalPlayer
plr.PlayerGui.XPCounter:Play() --Get into the players Gui
0
Thanks, but I need to play it from the server script :/ jjwood1600 215 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

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

Answer this question