Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is the sound in this script not working?

The sound in this script dosen't seem to work.

local Lightning = script.Parent.PointLight
while true do
	script.NumberValue.Value = math.random(1, 2)
	if script.NumberValue.Value == 1 then
		script.Parent.Thunder.SoundId = "http://www.roblox.com/loud-thunder-item?id=130818249"--50
		else script.Parent.Thunder.SoundId = "http://www.roblox.com/Thunder-1-item?id=131300620"--21
		end
	wait(7)
	Lightning.Range = 60
	wait(0.7)
	Lightning.Range = 50
	wait(0.1)
	Lightning.Range = 40
	script.Parent.Thunder:Play()
	wait(0.1)
	Lightning.Range = 30
	wait(0.1)
	Lightning.Range = 20
	wait(0.1)
	Lightning.Range = 10
	wait(0.1)
	Lightning.Range = 0
	wait(0.1)
	wait(math.random(1,5))
	end

1 answer

✓ Accepted answer

When doing Ids for roblox for like models, audios, or clothing, or even decals you can't just copy the Roblox URL. You have to include the following

.SoundId = "http://www.roblox.com/asset/?id=IDNUMBERHERE" -- Roblox uses an Asset service type thing, If you just type in a regular URL it won't work, You have to do what i did but with your ID for the sound to work.

1 comment

0

Ohhhhh. The reason I could get it to work manually was because it automatically did the RBXasset bit. Thanks again!

This discussion is preserved as it was. New answers, comments, and votes are closed.