This script is supposed to change the soundid of a sound as values in the game change.
However, the script doesn't work, and I have no idea why, as output gave me nothing.
Can someone please help me?
Here's the script:
local Map = game.ServerScriptService.MainGame:WaitForChild("Map")
local Game = game.ServerScriptService.MainGame:WaitForChild("Playing")
while wait(0.1) do
if Game.Value == true then
if Map.Value == "Map1" then
script.Parent.SoundId = "id here"
elseif Map.Value == "Map2" then
script.Parent.SoundId = "id here"
end
end
end

2 comments
That method did not work, but I tried a different method, and it worked fine.
oh ok