Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This Radio gp script does not work, the sound won't play?

Asked by 5 years ago
Edited 5 years ago

So I am making a Radio gp and the scripts are not working. I want to make it to where everyone can hear the music.

--Local Script
script.Parent.MouseButton1Click:Connect(function()
    script.Parent.RemoteEvent:FireServer()
end)

--Server Script
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player)
    local Radio = player.Character.Radio
    local input = script.Parent.Parent.Input.Text
local sound = Radio.Sound
sound.SoundId = 'rbxassetid://'..input
sound:Play()
end)

0
What ended up working? royaltoe 5144 — 5y

1 answer

Log in to vote
0
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago

Have the sound on the server. You are currently playing it only for the player. Also, are there any errors in the output? Add a print on the first line of the server script. Is that being called?

Ad

Answer this question