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

How do you play music for one person?

I want to know how to play music for one single person, let's say, right when you join the game, its plays a 20 second song, but I don't want the other people, who are already in the game to hear the song. How could I do that?

1 comment

0

You can use a LocalScript.

2 answers

you use a local script to play it, and put it in starter gui if you want it to play every time they spawn, or only in the workspace.

2 comments

0

(if you only want it to play once)

0

Thanks! If I put it in workspace, will it play one time at the start of the game?

local Player = game:GetService("Players").LocalPlayer

local PlayerGui = Player:FindFirstChild("PlayerGui")

local UrSound = Instance.new("Sound", PlayerGui)
UrSound.Name = "Sound"
UrSound.SoundId = "yourid"
wait(.1)
UrSound:Play()

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