I've never used audio so of course, i'm new to it. How do I call it so it plays?
my weak attempt:
function Play() Play(--audio id--) end
ROBLOX has an object which allows for easy playing of music called Sound. The ID is the asset ID, and the method to call it is "Play".
function Play(audioId) local sound = Instance.new("Sound") sound.SoundId = audioId sound:Play() end
It's also worthy to note that you should preload sounds, as it will not play until it is loaded. You can find out how to on the ROBLOX Wiki.
local soundid = yoursoundhere function Play() local sound = Instance.new("Sound") sound.SoundId = soundid sound:Play() end
This is probably how I'd do it. I haven't tested this though so I'm not sure if it'll work
I suggest that you first ask the ROBLOX WIKI before asking us how to play a Sound