EOASTUDIO
(EOASTUDIO)
April 11, 2022, 6:26pm
1
I want to make a button that pulls up or down the volume of a video. From the begining, .Volume is set to 100. When you clcik the +volume, the volume goes up +1, like this:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent:FindFirstChild("VideoFrame").Volume = +1
end)
And the -volume:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent:FindFirstChild("VideoFrame").Volume = -1
end)
why doesn’t it work?
1 Like
EOASTUDIO
(EOASTUDIO)
April 11, 2022, 6:31pm
2
This is on my script analisis.
Valkyrop
(aHuman)
April 11, 2022, 6:32pm
3
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent:FindFirstChild("VideoFrame").Volume += 1
end)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent:FindFirstChild("VideoFrame").Volume -= 1
end)
1 Like
EOASTUDIO
(EOASTUDIO)
April 11, 2022, 6:36pm
4
Seems like the video doesn’t have noise. Sorry.
Synitx
(Synitx)
April 11, 2022, 7:16pm
5
It doesn’t matter if your video have noise or not, every video have volume property.
the thing is you are changing value operator. ( +
-
= -
or -
-
= +
thing)
Try -=
or +=
instead.
Example:
videoFrame.Volume += 1
videoFrame.Volume -= 1
Or
videoFrame.Volume = videoFrame.Volume + 1
videoFrame.Volume = videoFrame.Volume - 1
Yours:
Current method:
output:
tinycells
(Relentless)
April 11, 2022, 7:34pm
6
@EOASTUDIO Cmon all videos are volume property, there is a video with no such things as no volume property
1 Like
EOASTUDIO
(EOASTUDIO)
April 11, 2022, 8:07pm
7
I said the vídeo doesnt contain noise, not that it doesnt have volume property.
1 Like