Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Which Property or Event works with Sound in a server script?

I've tried:

.IsPlaying .Ended .Stopped

They aren't being detected by a Server script, suggestions?

1 answer

You should detect the events locally and invoke RemoteEvents.

Server:

local Event = Instance.new("RemoteEvent", game.ReplicatedStorage)
Event.Name = "SoundEnded"
Event.OnServerEvent:connect(function(Player)
	-- "Player" now contains the player the sound ended for
end)

Client:

workspace.SomeSound.Ended:connect(function()
	game.ReplicatedStorage:WaitForChild("SoundEnded"):InvokeServer()
end)

1 comment

0

Yeah, but if some guy stops the music, the whole server will get the same effect.

This discussion is preserved as it was. New answers, comments, and votes are closed.