Soundクラス
ひとことで言うと
音を鳴らす部品です。パーツの中に入れると、その場所から音が聞こえます。
公式の説明(英語):An object that emits sound. This object can be placed within a BasePart or Attachment to emit a sound from a particular position within a place or world, or it can be attached elsewhere to play the sound at a constant volume throughout the entire place.
クラスの関係
プロパティ(18)
| 名前と書き方 | 説明 |
|---|---|
AudioContentSound.AudioContent: Content | A reference to an audio asset. |
IsLoadedSound.IsLoaded: boolean | This property is true when the Sound has loaded from Roblox servers and is ready to play. |
LoopedSound.Looped: boolean | trueにすると、くりかえし鳴らします。Sets whether or not the Sound repeats once it has finished playing. |
LoopRegionSound.LoopRegion: NumberRange | A range denoting a desired loop start and loop end within the Class.Sound.PlaybackRegion|PlaybackRegion, in seconds. |
PlaybackLoudnessSound.PlaybackLoudness: double | A number between 0 and 1000 indicating how loud the Sound is currently playing back. |
PlaybackRegionSound.PlaybackRegion: NumberRange | A range denoting a desired start and stop time within the Class.Sound.TimeLength|TimeLength, in seconds. |
PlaybackRegionsEnabledSound.PlaybackRegionsEnabled: boolean | If true, this property gives your Sound access to the Class.Sound.PlaybackRegion|PlaybackRegion and Class.Sound.LoopRegion|LoopRegion properties which can more-accurately control its playback. |
PlaybackSpeedSound.PlaybackSpeed: float | Determines the speed at which a Sound will play, with higher values causing the sound to play faster and at a higher pitch. |
PlayingSound.Playing: boolean | Indicates whether the Sound is currently playing. |
PlayOnRemoveSound.PlayOnRemove: boolean | When true, the Sound will play when it is removed from the experience. |
RollOffMaxDistanceSound.RollOffMaxDistance: float | The maximum distance, in studs, a client's listener can be from the sound's origin and still hear it. Only applies to Class.Sound|Sounds parented to a BasePart or Attachment. |
RollOffMinDistanceSound.RollOffMinDistance: float | The minimum distance, in studs, at which a Sound which is parented to a BasePart or Attachment will begin to attenuate (decrease in volume). |
RollOffModeSound.RollOffMode: RollOffMode | Controls how the volume of a Sound which is parented to a BasePart or Attachment attenuates (fades out) as the distance between the listener and parent changes. |
SoundGroupSound.SoundGroup: SoundGroup | The SoundGroup that is linked to this Sound. |
SoundIdSound.SoundId: ContentId | 鳴らす音のID(rbxassetid://番号)。Content ID of the sound file to associate with the Sound. |
TimeLengthSound.TimeLength: double | The length of the Sound in seconds. |
TimePositionSound.TimePosition: double | Progress of the Sound in seconds. Can be changed to move the playback position of the Sound both before and during playback. |
VolumeSound.Volume: float | 音量。The volume of the Sound. |
メソッド(4)
| 名前と書き方 | 説明 |
|---|---|
PauseSound:Pause(): () | Pauses playback of the Sound if it is playing. |
PlaySound:Play(): () | 音を鳴らします。Plays the Sound. |
ResumeSound:Resume(): () | Resumes the Sound. |
StopSound:Stop(): () | 音を止めます。Stops the Sound. |
イベント(7)
| 名前と書き方 | 説明 |
|---|---|
DidLoopSound.DidLoop(soundId: string, numOfTimesLooped: int) | Fires whenever the Sound loops. |
EndedSound.Ended(soundId: string) | 音が鳴り終わったときに発生するイベントです。Fires when the Sound has completed playback and stopped. |
LoadedSound.Loaded(soundId: string) | Fires when the Sound is loaded. |
PausedSound.Paused(soundId: string) | Fires whenever the Sound is paused using Class.Sound:Pause()|Pause(). |
PlayedSound.Played(soundId: string) | Fires whenever the Sound is played using Class.Sound:Play()|Play(). |
ResumedSound.Resumed(soundId: string) | Fires when the Sound is resumed using Class.Sound:Resume()|Resume(). |
StoppedSound.Stopped(soundId: string) | Fires when the Sound is stopped through using Class.Sound:Stop()|Stop(). |
受け継いでいるメンバー
Instance から受け継いでいるもの(46)
Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged
Object から受け継いでいるもの(4)
英語の説明とメンバーの一覧は、Roblox Creator Documentation(Sound)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。