I’m recreating the Bloom generative music app and I’m encountering an issue where my sounds are playing in Studio but not on Roblox when published
This is what I’ve tried to attempt to troubleshoot thus far.
- Added a print statement that indicates which note was supposed to be played.
- The use of ‘’contentProvider:PreloadAsync()’’ to be sure the sounds have loaded.
- Made sure all uploaded sounds were approved.
These are the snippets from my client script:
More snippets can be requested
The random sound selection logic inside my circle creation (castCircle) function:
local note = RandNote() -- <The names of the notes are stored in a table and
-- are indexed from a folder containing the sounds in RepStorage.>
if note then
note.Parent = game.SoundService
note.Volume = vols[note.Name]
note:Play()
print("playing:", note.Name) -- <On a Roblox game client, notes are being printed, but not played.>
local Length = note.TimeLength
local fadeout = TweenInfo.new(Length, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local Destination = {Volume = 0}
local createfade = tweenService:Create(note, fadeOutTweenInfo, fadeOutGoal)
createfade:Play()
createfade.Completed:Connect(function()
note:Destroy()
end)
else
end
Calling the castCircle function which creates a circle and plays a random note:
local function Interact(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
local mousePos = userInputService:GetMouseLocation() - bg.AbsolutePosition
castCircle(Vector2.new(mousePos.X, mousePos.Y)) -- <A random sound is played when the
--"castCircle" function is called.>
end
end
Videos comparing the behaviors:
Roblox Studio
Published in Roblox
My volume is turned up to the max, I’m not that foolish.