boombox script
Key RequiredUniversal

boombox script

Universal Scriptfatihosmanfatihosman 2.3K views 1.7K executesUpdated Mar 8, 2026
0.0/ 5(1 votes)
010% Positive
Lua Script•19 lines (828 chars)
- Place this inside a Script in ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlayAudioEvent = Instance.new("RemoteEvent", ReplicatedStorage)
PlayAudioEvent.Name = "PlayBoomboxAudio"

PlayAudioEvent.OnServerEvent:Connect(function(player, soundId)
    local character = player.Character
    if character and character:FindFirstChild("HumanoidRootPart") then
        -- Find or create the sound object
        local sound = character.HumanoidRootPart:FindFirstChild("BoomboxSound") or Instance.new("Sound")
        sound.Name = "BoomboxSound"
        sound.Parent = character.HumanoidRootPart
        
        -- Update and Play
        sound.SoundId = "rbxassetid://" .. soundId
        sound.RollOffMaxDistance = 50 -- So you don't annoy the whole map
        sound:Play()
    end
end)

Features & Information

- Place this inside a Script in ServerScriptService local ReplicatedStorage = game:GetService("ReplicatedStorage") local PlayAudioEvent = Instance.new("RemoteEvent", ReplicatedStorage) PlayAudioEvent.Name = "PlayBoomboxAudio" PlayAudioEvent.OnServerEvent:Connect(function(player, soundId) local character = player.Character if character and character:FindFirstChild("HumanoidRootPart") then -- Find or create the sound object local sound = character.HumanoidRootPart:FindFirstChild("BoomboxSound") or Instance.new("Sound") sound.Name = "BoomboxSound" sound.Parent = character.HumanoidRootPart -- Update and Play sound.SoundId = "rbxassetid://" .. soundId sound.RollOffMaxDistance = 50 -- So you don't annoy the whole map sound:Play() end end)

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts