Engine Class
SoundGroup
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
สรุป
เอกสารอ้างอิงเกี่ยวกับ API
คุณสมบัติ
Volume
ตัวอย่างโค้ด
กลุ่มเสียง
local SoundService = game:GetService("SoundService")
-- สร้างกลุ่มเสียง
local soundGroup = Instance.new("SoundGroup")
soundGroup.Parent = SoundService
-- สร้างเสียง
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://9120386436"
sound.Looped = true
sound.PlaybackSpeed = 2
sound.SoundGroup = soundGroup
sound.Parent = workspace
-- เล่นเสียง
sound:Play()
task.wait(10)
-- เปลี่ยนระดับเสียง
soundGroup.Volume = 0.1
task.wait(3)
-- คืนระดับเสียง
soundGroup.Volume = 0.5
task.wait(4)
-- เพิ่มผลกระทบเสียง
local reverb = Instance.new("ReverbSoundEffect")
reverb.Parent = soundGroup