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

Playlist song script playing globally, how to make it "local"?

I want to make a playlist that loops, i have a script that works, but when i test the game, the song will play globally. And i wanted to make it coming from a radio, you wont listen when too far away. But for some reason the script makes the song play globally instead of just following the configs I set on the sound object (like emitter size and max distance). And yes i put the sound inside the object. Can someone help help me? With a new method or just fixing this one. Thank you in advance. Heres the short yt video I used to make the script work. The script:

local S1 = script.Parent.S1
local S2 = script.Parent.S2
local S3 = script.Parent.S3
---------------------------

while true do
S1:Play()
S1.Ended:Wait()
wait(5)
S2:Play()
S2.Ended:Wait()
wait(5)
S3:Play()
S3.Ended:Wait()
wait(5)

end

1 answer

✓ Accepted answer

You can play it globally, in a way that other players will also listen to the player when they get close. In that case, you can insert a server script in the StarterCharacterScripts, then put the songs inside of the script and write the following:

script:FindFirstChild("S1").Parent = script.Parent.Head
script:FindFirstChild("S2").Parent = script.Parent.Head
script:FindFirstChild("S3").Parent = script.Parent.Head

while true do
	S1:Play()
	S1.Ended:Wait()
	wait(5)
	S2:Play()
	S2.Ended:Wait()
	wait(5)
	S3:Play()
	S3.Ended:Wait()
	wait(5)
end

I hope that helps :D

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