I want to make a volume changer where you click the button and and it makes it louder and press a different one it makes it less loud im doing this with a GUI. Would it be like game.Worspace.sound.Volume: Add .1? or different?
✓ ANSWER ACCEPTED
Volume Changer?
2 answers
✓ Accepted answer
Why did you downvote bubbaman's answer? It's correct.
local gui = script.Parent -- holder
local up = gui.VolumeUp
local down = gui.VolumeDown
local sound = game.Workspace.sound
local changeAmount = 0.1
up.MouseButton1Click:connect(function()
sound.Volume = sound.Volume + changeAmount
end)
down.mouseButton1Click:connect(function()
sound.Volume = sound.Volume - changeAmount
end
Hope I helped :)
workspace.sound.Volume = workspace.sound.Volume +.1
1 comment
0
This doesnt change?
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Though this answer is correct, it is always a good idea to explain what the code does and how it works so the player can learn from it :P