I basically have a localscript in StarterGui that handles remote events passed to the client. It detects all other remote event functions but this one: function fadesound() local TweenService = game:GetService("TweenService") local song = game.Workspace:FindFirstChild("Sound") TweenService:Create(song,TweenInfo.new(1),{Volume = 0}):Play() end game.ReplicatedStorage.RemoteEvent2.OnClientEvent:Connect(fadesound)
Although it’s not needed, here’s my code that fires the remote event (jnside a serverscript): game.ReplicatedStorage.RemoteEvent2:FireClient(person)
Any idea why it wouldn’t work? Two things to note is that “person” does exist and it’s the player. The second thing to note is that the same local script originally LOCALLY creates the same sound this remote event needs to fade.
Try putting print() in the start of the fadesound function to make sure the remote event is working. If it doesn’t print anything, it’s a problem with the remote event.
why do you have local TweenService = game:GetService("TweenService") inside the function? you don’t have to call it every time the event fires so maybe put it outside lol (just letting you know)
Yes, i made a script that prints “song here” if local song ~= nil and it worked, however it didn’t make the song fade out. there’s likely something wrong with the tween
No, song starts playing after around 1 minute into the game. One thing to note is that there’s no sounds in workspace beforehand and all sounds are created through script. I’ll check that.
Actually I believe I found the issue. There’s two audios in the first minute of the game that are never destroyed. The script likely fades these audios because one still doesn’t end when the function is called (the audio only just fades). Thanks for your help, if you didn’t comment that I likely wouldn’t check workspace until hours later.
Everything seemed to work fine when I tested it so check your game if you have multiple instances named ‘Sound’ or you if you have another script adjusting the volume.