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

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

Asked by 5 years ago
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

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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.

Ad
Log in to vote
0
Answered by 5 years ago

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

Answer this question