✓ Accepted answer
I'm guessing you're trying to make the volume go down for EVERYONE. In this case, OnClientEvent is not the way to go. You should be using FireServer and OnServerEvent instead.
Server-side is the game and the things that are visible to all clients. Client-side is the individual's device, and the things only visible to that player. For example, a GUI is client-side because only that player can see it on their screen. As for a baseplate in the workspace is server-side, because all clients can interact with it.
So if you need everyone to hear the volume change, you need to fire the server, since it's server-side.
Here's what it should look like (make sure the second block of code is in a normal script).
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local vd = ReplicatedStorage:WaitForChild("volumedown")
script.Parent.MouseButton1Click:connect(function()
vd:FireServer()
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local vd = ReplicatedStorage:WaitForChild("volumedown")
vd.Name = volumed
vd.OnServerEvent:Connect(function()
game.Workspace.Audio.Volume = game.Workspace.Audio.Volume -0.1
end)
2 comments
OOPS
i just realised i didnt wanted to make a volume down button but this will help me alot if i try to make a input remoteevent