When I tried to play a sound using PlayLocalSound() nothing plays at all.
Video link of bug:
Is there any way to fix this? It worked yesterday, now its not?
Here is my code I don’t why it doesn’t work at all
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Space then
if AllowAudioPlay == true and AudioCurrentlySelected ~= nil and AudioCurrentlySelected:IsA("Sound") then
if PreviousAudio ~= AudioCurrentlySelected then
PreviousAudio = AudioCurrentlySelected
--AudioCurrentlySelected.PlaybackSpeed = 1
SoundService:PlayLocalSound(AudioCurrentlySelected)
print("play attempt")
elseif PreviousAudio == AudioCurrentlySelected then
if AudioCurrentlySelected.PlaybackSpeed == 1 then
--AudioCurrentlySelected.PlaybackSpeed = 0
print("pause attempt")
elseif AudioCurrentlySelected.PlaybackSpeed == 0 then
--AudioCurrentlySelected.PlaybackSpeed = 1
SoundService:PlayLocalSound(AudioCurrentlySelected)
print("play attempt")
end
end
end
end
end
end)
Edit: I’ve tried playing the sound manually using the command bar, yet nothing seems to play at all