#why does this local script keep giving me trouble?
1 messages · Page 1 of 1 (latest)
i know someones gonna say "i can't help you without the code"
local Ambience = Replicated["Eerie Ambience 1 (SFX)"].SoundId
local Music = Replicated.Sound.SoundId
local RemoteEvent = Replicated.WorkPlease
local BoolValue = script.Room
game.Lighting.TimeOfDay = 6.5
-- sound
local ambience = Replicated:WaitForChild("Eerie Ambience 1 (SFX)")
local music = workspace:WaitForChild("Music")
local function onChanged(plr)
if BoolValue.Value == true then
game.Lighting.TimeOfDay = 12
music.SoundId = Music
music:Play()
end
if BoolValue.Value == false then
game.Lighting.TimeOfDay = 6.5
music.SoundId = ambience.SoundId
music:Play()
end
music:Play()
end
onChanged()
BoolValue.Changed:Connect(onChanged)```
here's the code, what could have i messed up to make it work in studio but not in game
is my game cursed?
Is this in server storage or server script service
Nvm
I dont think ur getting thr value of boolValue
Ur just getting the instance
Unless ur meant to do that
what do you mean by "refuses to sometimes work" is it erroring or just not working
just didn't work