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

How to get a sound in this?

Asked by 8 years ago

p.Anchored = false p.CanCollide = true p.BottomSurface = 0 p.TopSurface = 0 p.BrickColor = BrickColor.new("Neon orange") p.Reflectance = 0.1 p.formFactor = 0 p.Size = Vector3.new(1,1,2) p.Material = "Neon"

Basically want it to make a sound whenever it spawns.

0
UndeniableLimited gave you the basic idea of creating a sound; it is up to you to play it. Marios2 360 — 8y

1 answer

Log in to vote
3
Answered by 8 years ago

1) This is a request and SH is not a request site 2) This is simple so here's the code:

s = Instance.new("Sound") -- Create the sound!
s.SoundId = "http://www.roblox.com/asset?id=000000000" -- Change 000000000 to your audio ID
s.Volume = 1 -- Volume of the audio.
s.Pitch = 1 -- Pitch of the audio.
s.Looped = true -- Loop the audio?
s:Play() -- Remove this if you don't want to play it immediately]
Ad

Answer this question