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

Sound help, please?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago

What I want is when you join the game they have this song playing and the song is 81 seconds btw.. Then it plays a diff song.

while true do
script.Parent:Play()
wait(84)
script.Parent.SoundID = "268518248" :Play()
end

2 answers

Log in to vote
0
Answered by 8 years ago

They way we will detect a player added, is when a player is added to game.Players. Hope This Helps Code:

local sound = script.Parent

function onPlayerEntered(player)
    repeat wait () until player.Character
    sound:Play()
    wait(84)
    sound.Soundid = "http://www.roblox.com/asset/?id=222954131"
end

game.Players.PlayerAdded:connect(onPlayerEntered)
0
Nope, does not work FiredDusk 1466 — 8y
0
do you get any errors? pluginfactory 463 — 8y
0
You try it out for yourself FiredDusk 1466 — 8y
0
Ok i edited to code a bit, so it waits for the character to fully load pluginfactory 463 — 8y
Ad
Log in to vote
0
Answered by 8 years ago
music = Instance.new("Sound",workspace)
music:Play()
music.SoundId = "SOUND ID HERE"
--Also if u want to add a nother sound do elseif music.IsPlaying == false then music.SoundId = ""
--[[  YOURE WELCOME FRIEND :)  ]]--
while true do
    wait(10)
if music.IsPlaying == false then
    music.SoundId = "SOUND ID HERE"
elseif music.IsPlaying == false then
    music.SoundId = "DIFF SOUND ID HERE"
end
end


Answer this question