Is there a way i can combine these two scripts so the while true do script on the bottom will play after the sound:Play() on the main script on the top?

local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=162555471"
sound.Parent = game.Workspace.Sound3
sound:Play()
wait(150)
sound:stop()

And

while true do
game.Lighting.Ambient = Color3.new(math.random(), math.random(), math.random())
wait(0.1)
end

6 comments

0

Use coroutines.

0

Didnt work :(

0

Do you know how to use coroutines?

0

Nope

0

I researched it and i don't get it

0

Never mind i figured it out