So in my game some of the important features are sound effects so i need someone to help me script it so i can put any sound into the script and then when the door opens it will make the sound.
Here is the model https://www.roblox.com/library/4727006455/Opening-Door
When your done please reply with the finished model/finished script
Thank you so much
There is no point in scripting if your asking people to spoon-feed you.
You can simply use :Play() to play a song.
e.g
You insert a Sound/Audio object into the door. Put the door sound id inside the object. It should change to something like "rbxassetid://123456789" now inside the door script find the part where it opens and do script.Sound:Play()
(Assuming you put the sound inside the script) which will play the sound.
You can do a sound and use :Play()
to play the sound.
For example, lets do an 'Oof' sound if opened. (This thing is I made, not the model, and just example.)
local part = Instance.new("Part", workspace) local clickdetector = Instance.new("ClickDetector", part) local sound = Instance.new("Sound") part.Position = Vector3.new(0,5,0) part.Size = Vector3.new(10,1,7) part.BrickColor = BrickColor.Black() part.Orientation = Vector3.new(0, 90, 90) part.Anchor = true sound.SoundId = "rbxassetid://604650009" clickdetector.MouseClick(function() sound:Play() end)
That's the example, just do something like this, I think it should work.
If you have more question, just comment below :)
Closed as Not Constructive by GeneratedScript, Filipalla, and RayCurse
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?