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

Music on entered - Weird problem?

Hello everyone,

I was having so slight trouble with this "easy" script. It works perfectly fine in studio, but it refused to work in the normal player. I've already tried putting it in a LocalScript in workspace, but that doesn't seem to do anything neither. Help would be appreciated!

local s = Instance.new("Sound")

s.Name = "Sound"
s.SoundId = "http://www.roblox.com/asset?id=149730036"
s.Volume = 0.2
s.Pitch = 1
s.Looped = true
s.archivable = true

s.Parent = game.Workspace.Camera

wait(1)

s:play()

1 answer

✓ Accepted answer
local s = Instance.new("Sound")

s.Name = "Sound"
s.SoundId = "http://www.roblox.com/asset?id=175376701"
s.Volume = 0.2
s.Pitch = 1
s.Looped = true
s.archivable = true

s.Parent = script.Parent.Parent

wait(1)

s:play()

Trying to put the script into a studio's camera is not the best idea

4 comments

0

That would work indeed, but I was trying to let that sound play local, so how could I put it in the camera of the LocalPlayer?

0

You do not need to put it into the camera for it to play local

0

ALSO, localscripts do NOT run in workspace. OR anywhere that is not the player.

0

@lego If you want the sound to play local, put it in the player's PlayerGui.

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