Simple script works in studio but not in game?

Hello Devforum!

The title pretty much explains my issue. Now, this topic is very similar to other topics, but I couldn’t find one that could help my case. I’m new to scripting but thought it would be easy enough to make this script. It’s one of the simplest things possible.

local music = script.Parent.Parent.Part.Sound

wait(32)

music:Play()

Its purpose is simply to wait 32 seconds before playing a sound.
And it works flawlessly! Nothing in the output.

Except… in-game, it just doesn’t work at all.
Everything’s published and committed, and I have no idea what to do. Any help?

try making it client sided if you haven’t already, could be something with server replication

I know this might seem a little stupid, but…
what does that mean?
Sorry, I’m way too new to Roblox Studio to understand that :person_shrugging:

so inside of StarterPlayerStarterPlayerScripts add a LocalScript and then do

local music = --enter music thing here, like: workspace.Part.Sound

wait(32)

music:Play()

Wow, I truly thought this would be a hard problem. Better learn about this for future reference. Thanks so much!

1 Like

no worries, always happy to help :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.