-
What do you want to achieve? I want to play the sound while clicked.
-
What is the issue? I don’t know how to do that.
while true do
sound:play
sound:stop
like this.
What do you want to achieve? I want to play the sound while clicked.
What is the issue? I don’t know how to do that.
while true do
sound:play
sound:stop
like this.
When you click your mouse? Be more specific.
The sound only comes out during the long press. (Translate.) long press is mouse click. I am making the buzzer system for the train.
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local holding = false
Mouse.Button1Down:Connect(function()
holding = true
end)
Mouse.Button1Up:Connect(function()
holding = false
end)
while true do
if holding == true then
sound:Play()
task.wait(sound.TimeLength)
else
break
end
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.