So I have a module script that in a line gives these 2 music ids:
MusicIDs = {5128445418,1847605161}
and to invoke them I wrote this in a script place
local ModulePL = require(game.ReplicatedStorage.ModuleScipt)
local music = game.SoundService.Music
music.SoundId = ModulePL.MusicIDs[2]
However it is giving an error, as I don’t know much about tables I don’t know how to solve this. Some help?
Omb2a
(Omb2)
2
First thing.
Did you put local MusicIDs or MusicIDs?
Second :
What is the error?
Also, Give us all the scripts instead of writing them
We don’t know what ModulePL.MusicIDs[2] function do
1 Like
blokav
(blokav)
3
Can you show us the actual text of the module script?
Like is it returning this:
local module = {}
module.MusicIDs = {5128445418,1847605161}
return module
Or something like this:
MusicIDs = {5128445418,1847605161}
return MusicIDs
1 Like
Like is it returning this:
local module = {}
module.MusicIDs = {5128445418,1847605161}
return module
I’ll explain everything again but in more detail
blokav
(blokav)
6
What does the error message say?
1 Like
Omb2a
(Omb2)
9
I knew the problem when you put
music.SoundId = ModulePL.MusicIDs[2]
That is wrong
Put that instead :
music.SoundId = "rbxassetid://"..ModulePL.MusicIDs[2]
3 Likes
thanks for the help, i had forgotten it.