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

Is it possible to play a sound from local script my local script does not work?

wait(5)

  

  

Sound = script.Parent

  

Sound:Play()

THe sound is in workspace

the local script is the child of sound

im trying to get it to play but it won't play nothing in the output either

2 answers

✓ Accepted answer

From the API reference:

"A LocalScript will only run Lua code if it is a descendant of one of the following objects:

  • A Player’s Backpack, such as a child of a Tool
  • A Player’s character model
  • A Player’s PlayerGui
  • A Player’s PlayerScripts
  • The ReplicatedFirst service"

Hope this helps.

Basically you just have to change it from a local script to a normal script

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