Music id script
Key RequiredUniversal

Music id script

Universal ScriptKyeliszKyelisz 1.1K views 1.8K executesUpdated Mar 17, 2026
Unrated
00
Lua Script•34 lines (929 chars)
-- Configuration
local SOUND_ID = "rbxassetid://17594884733" -- Replace with your actual sound ID i just put a knocking sound for now 
local PLAY_DURATION = 6.999999999999 -- seconds

-- Create or get the Sound object
local sound = Instance.new("Sound")
sound.SoundId = SOUND_ID
sound.Volume = 1 -- Adjust volume (0 to 10)
sound.Looped = false
sound.Parent = game.Workspace -- You can parent it to a part or UI element

-- Function to play and stop the sound
local function playAndStopSound()
    -- Safety check
    if not sound.SoundId or sound.SoundId == "" then
        warn("No valid SoundId set.")
        return
    end

    -- Play the sound
    sound:Play()

    -- Wait for the specified duration
    task.wait(PLAY_DURATION)

    -- Stop the sound
    if sound.IsPlaying then
        sound:Stop()
        print("Sound stopped after " .. PLAY_DURATION .. " seconds.")
    end
end

-- Run the function
playAndStopSound()

Features & Information

a script that plays any sound of your will THIS IS VISUALS ONLY YOU CAN HEAR THIS
#dodo#dodos music id script#music script#dodos#music

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts