I have a spin wheel, and it will spin faster and faster over time and then stop. for each “tick”, it will play a sound, so the sound is playing more and more frequently
sometimes the sound would play for the first couple of ticks, but then it doesn’t play at all for the rest of the ticks
local function Spin()
local waitTime = 0.4
local sound = script:WaitForChild(“TickSound”)
for i = 1 to 20 do
-- rotate wheel one sector
sound:Play()
task.wait(waitTime)
waitTime *= 0.9
end
end
the sound may be playing too many times too quickly. after 10 spins it would be playing every 0.1 seconds. you could try duplicating the sound, then playing it and deleting it afterwards
would look like this
local function Spin()
local waitTime = 0.4
local sound = script:WaitForChild(“TickSound”)
for i = 1 to 20 do
-- rotate wheel one sector
local newSound = sound:Clone()
newSound.Parent = sound.Parent
newSound:Play()
game.Debris:AddItem(newSound, 1)
task.wait(waitTime)
waitTime *= 0.9
end
end