This is a very simple script, yet it seems to have a glitch.
local cue=script.Parent.Music:GetChildren()
local r=math.random(1,#cue)
local song=cue[r]
It returns no errors, but it always returns 1, which is the very first song. Then it plays the second, then the third, and so on. I want it to choose randomly, but the math.random function always returns 1.

1 comment
Try printing out
#cueafter you initialize what cue is. Is it always 1?