I am making a game that when you press a button a series of lanterns are released into the air followed by various effects.
Part of this is stopping the already playing music, and playing a new song. But when the button pressed (in-game) the music does not play and the lanterns are not released. Yet when in studio it works perfectly fine.
FE is NOT on.
Here is my code:
script.Parent.ClickDetector.MouseClick:connect(function()
local la = game.Workspace.Lanterns
local lag = la:GetChildren()
for _,v in pairs(game.Players:GetChildren()) do
v.PlayerGui.LIGHT:Play()
v.PlayerGui.Nature:Stop()
v.PlayerGui.Play.Disabled = true
script.Parent.ClickDetector:Destroy()
for _,v in pairs (lag) do
spawn(function()
if v.Name == "LanternAtt" then
local attA = v:FindFirstChild("AttachmentA")
if attA then
local at = attA:FindFirstChild("Attachment")
if at then
wait(5)
at:Destroy()
wait(37)
game.Workspace.Atmosphere.ParticleEmitter.Enabled = false
wait(10)
game.Lighting.SunRays.Intensity = 0.2
end
end
end
end)
end
wait(100)
for _,v in pairs (lag) do
v:Destroy()
end
end
end)
Please help!

5 comments
Sound:Play(). c:Does it really play in starterGui? ,I thought it only plays on PlayerGui
@Thee, Notice line 5, im trying to get it to play there. @roblor, It doesn't play in starterGui that's why im trying to make it play in playerGui (lines 5-7)
lol I was jk man. :P What's
Play? (Line 7)It's a script that makes nature play