Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Music not changing w/ script, and no console errors?

Okay, so I have this script that's supposed to change audio when I press the button (as seen in last question), but it doesn't actually change anything, I don't get errors because I forgot the rbxassetid:// at the beginning the first time, no warnings, nothing. The audio also doesn't change. Script:

--script removed

Yeah, that's all, thanks. I already know this works, because I just had it print.

1 answer

✓ Accepted answer

I've had this problem before and I know what to do:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local revent = ReplicatedStorage.SoundEvent
local audio = script.Parent.Sound


local function test(player,song1id)
audio.SoundId = song1id
end




revent.OnServerEvent:Connect(test)

1 comment

0

Wow, that surprisingly works, didn't think it would be something as simple as that.

This discussion is preserved as it was. New answers, comments, and votes are closed.