RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"volume up and down"
-- local script for volume control local gui = script.Parent local sound = game.Workspace.MySound local currentVolume = sound.Volume function volumeUp() if currentVolume < 1 then currentVolume = currentVolume + 0.1 sound.Volume = currentVolume gui.Volume.Text = "Volume: " .. tostring(math.floor(currentVolume * 100)) .. "%" end end function volumeDown() if currentVolume > 0 then currentVolume = currentVolume - 0.1 sound.Volume = currentVolume gui.Volume.Text = "Volume: " .. tostring(math.floor(currentVolume * 100)) .. "%" end end gui.VolumeUp.MouseButton1Click:Connect(volumeUp) gui.VolumeDown.MouseButton1Click:Connect(volumeDown)