Universal Script 📌
2.4k Views
2.0k Executions

boombox script

Universal Script 📌
fatihosman
fatihosman10K executions
8 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

- 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)

View Raw
- 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)


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Script hub
178.8k
1.7M
Bumped 3 hours ago
Key System
Universal Script 📌
9.1k
31.5k
Bumped 4 hours ago
Script hub
49.8k
12.3k
Bumped 5 hours ago
Key System
Paid
Script hub
5.5M
1.1M
Bumped 9 hours ago
Key System
Script hub
20.6k
4.0k
Bumped 10 hours ago
Key System
Paid
Universal Script 📌
725
209
Approved 15 hours ago
Universal Script 📌
629
2.5k
Approved 16 hours ago
Universal Script 📌
591
589
Approved 16 hours ago