Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am trying to clone sound, but it gives the error which says that it doesn't load..??

Asked by 4 years ago
local sound1 = 144884872
local sound = Instance.new("Sound", Humanoid)
sound.SoundId = "rbxassetid://"..sound1
sound:Play()

2 answers

Log in to vote
1
Answered by 4 years ago

Like poke said, Sound1 is a number and you cannot convert a number to a string. The following should work:

sound.SoundId = "rbxassetid://"..tostring(sound1)

Ad
Log in to vote
0
Answered by
poke7667 142
4 years ago

I think the issue is your are trying to combine a string Val with a number value. In order to fix this, use the tostring() function to convert the number into a string.

Answer this question