
boombox script
Universal Script 📌
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
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)
- 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)








