I am making a tower defense game and there is a bug when I play test the game, there is a 50% chance the audios will actually play. By this I mean that the playtest is completely muted (the death sound doesn’t even play when I adjust my volume).
Sometimes after I re-playtest the game the audio enables. Also nothing comes up in the output.
Is there any way I can fix it so that the audio plays each time?
What do you want to achieve? A fixed Roblox Studio audio
What is the issue? About half the time I playtest, the Roblox Studio audio is completely muted
What solutions have you tried so far? I tried restarting my pc
local rs = game.ReplicatedStorage
local player = game.Players.LocalPlayer
local runservice = game["Run Service"]
for i,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("TextButton") then
v.TextButton.MouseEnter:Connect(function()
local hotkey = v:FindFirstChild("HotkeyNumber")
if hotkey then
game.SoundService.pop:Play()
tweenservice:Create(v.Frame,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{Size = UDim2.new(1.1,0,1.1,0),Position = UDim2.new(.5,0,.4,0)}):Play()
end
end)
v.TextButton.MouseLeave:Connect(function()
local hotkey = v:FindFirstChild("HotkeyNumber")
if hotkey then
tweenservice:Create(v.Frame,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{Size = UDim2.new(1,0,1,0),Position = UDim2.new(.5,0,.5,0)}):Play()
end
end)
end
end
Try adding one just before the Play() and see if it prints every time.
local rs = game.ReplicatedStorage
local player = game.Players.LocalPlayer
local runservice = game["Run Service"]
for i,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("TextButton") then
v.TextButton.MouseEnter:Connect(function()
local hotkey = v:FindFirstChild("HotkeyNumber")
if hotkey then
print("Play Sound")
game.SoundService.pop:Play()
tweenservice:Create(v.Frame,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{Size = UDim2.new(1.1,0,1.1,0),Position = UDim2.new(.5,0,.4,0)}):Play()
end
end)
v.TextButton.MouseLeave:Connect(function()
local hotkey = v:FindFirstChild("HotkeyNumber")
if hotkey then
tweenservice:Create(v.Frame,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In),{Size = UDim2.new(1,0,1,0),Position = UDim2.new(.5,0,.5,0)}):Play()
end
end)
end
end
Roblox recently has the game muted by default when you playtest, the only way to remedy the issue is to mute and unmute the game and the sounds should return. It’s quite irritating.
i know its playing because the rest of the script works and everything, its just that studio is completely muted and i cant even hear the oof sound when i adjust my volume
Alt Tab, when your focus is off roblox studio when you playtest and you reenter the sounds usually off. Easiest solution is to just alt tab and click back in. At least thats what i do.
Check your output in the roblox menu (Escape), when your playtesting.
Roblox automatically puts your output to your system’s DEFAULT, go to your sound settings and make the output you use, your default, there are tutorials on yt on how to do that, Im not gonna get into detail.
Free solve??
Now you can eat your noodles loudly, and hear the playback.
---Or you just click on and off until its not muted.