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

How do you play music for one person?

Asked by 5 years ago

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?

0
You can use a LocalScript. Oficcer_F 207 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

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.

0
(if you only want it to play once) Redcreepers123 2 — 5y
0
Thanks! If I put it in workspace, will it play one time at the start of the game? Riftery 0 — 5y
Ad
Log in to vote
0
Answered by 5 years ago
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()

Answer this question