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

What is wrong with this NOW!? ANSWERED (for ruin)

I got this (kind of) fixed, but when I hit start, it didn't play the song or even change the texture. It was only the same texture the whole time. This is the script AGAIN:

local decal = game.Workspace.Part.ParticleEmitter
local Sound = Instance.new("Sound", decal)

while true do   
    decal.Texture= ("http://www.roblox.com/asset/?id=186290703")
    Sound.ID = ("http://www.roblox.com/asset/?id=158666489")
	Sound:Play()
    wait(30)
	Sound:Stop()
    decal.Texture = ("rbxasset://textures/particles/sparkles_main.dds")
    Sound.ID = ("http://www.roblox.com/asset/?id=155965093")
	Sound:Play()
	wait(30)
	Sound:Stop()
end

Please help and I hope you understand! :D

4 comments

0

'ID' is not a Valid property of 'Sound', from my Perspective, your trying to change the 'SoundId' property of 'Sound'. WIKI on SoundId: http://wiki.roblox.com/index.php?title=SoundId

0

Well, I tried that where I paste the ULR in, but it is still not playing the sound nor the texture

0

Did you even look at the error returned in the output? 'ID' isn't a property of sound, what you're looking for is called 'SoundId'.

0

When did I mention the URL? I only said you are using an Invalid property of 'Sound' that is not existant..?

2 answers

Since my rep is going down for this, I put answered since I am stupid to ask a question to ruin my rep. If you can, please help.

3 comments

0

Your question is reasonable enough to be answered. The only misunderstanding I see is the fact that you did not (but need to) fix line 6 & 11. "ID" is not a property of the Sound object, but "SoundId" is.

0
0

OR: Sound.SoundId = "rbxassetid://158666489"

Try doing this, replace [SoundId] with the Sound's Id:

local Part = game.Workspace:WaitForChild('Part')
local Decal = Part:WaitForChild('ParticleEmitter')
local Sound = Instance.new('Sound', decal)
 
while true do  
    decal.Texture= ('http://www.roblox.com/asset/?id=186290703')
    Sound.ID = ('rbxassetid://[SoundId]')
    Sound:Play()
    wait(30)
    Sound:Stop()
    decal.Texture = ('rbxasset://textures/particles/sparkles_main.dds')
    Sound.ID = ('http://www.roblox.com/asset/?id=155965093')
    Sound:Play()
    wait(30)
    Sound:Stop()
end

1 comment

0

You failed to realize that line 07 and 12 that You are using "ID" instead of SoundId.

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