Can somebody help me? For some reason, my audio sound script work perfectly when I tested it in the studio and not in the actual game. How come? The brick make sound when someone step or touch the "Part" and the sound will play. I tried to added in the "Time Length" which is on line 7 and it work just fine in the studio but when I tested it in the actual game the script doesn't work.
You can also check my layout script if you are confuse:
https://gyazo.com/ceeaeb00fda00022dc87fe1236b66e24
local ready = true -- defines "ready"
script.Parent.Touched:connect(function()
if ready == true then
ready = false
script.Parent.Sound:Play()
wait(script.Parent.Sound.TimeLength) -- the part you wanted
print("finished playing")
wait(3)
print("3 seconds have passed")
ready = true
end
end)

2 comments
Where is the part the sound is in located?
I put the script which is above in a regular script in the part along with the soundtrack. Check the link above, I made an image of my layout.