local Player = game.Players.LocalPlayer
local Sounds = game.Workspace:WaitForChild("Sounds")
local Provinciales = Sounds:WaitForChild("Provinciales")
local Ambience = Sounds:WaitForChild("Ambience")
--local Provinciales = game.Workspace.CurrentCamera:WaitForChild("Provinciales")
local TheSound = game.Workspace.CurrentCamera:WaitForChild("TheSound")
local Day = game.Workspace.CurrentCamera:WaitForChild("Day")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlayerStats = ReplicatedStorage:WaitForChild("PlayerStats")
local PlayerData = PlayerStats:WaitForChild("Data_" .. Player.Name)
local UserSettings = PlayerData:WaitForChild("UserSettings")
local PSong = nil
repeat wait() until game.Players.LocalPlayer
Day:Play()
UserSettings.MusicOn.Changed:connect(function()
if UserSettings.MusicOn.Value then
Provinciales.Volume = 0.25
else
Provinciales.Volume = 0
end
end)
local function SelectSound(Sound)
local ChildrenSound = Provinciales:GetChildren()
while true do
local Choosen = ChildrenSound[math.random(#ChildrenSound)]
if Choosen ~= PSong then
PSong = Choosen
return Choosen
end
end
end
while wait() do
print'notworking'
local TheSound = SelectSound()
TheSound.SoundId = TheSound.SoundId
TheSound:Play()
wait(TheSound.TimeLength)
TheSound:Stop()
end
It's telling me when I click the GUI "Volume is not a valid member of Configuartion" |