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

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

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
1
Answered by 4 years ago

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)
0
Wow, that surprisingly works, didn't think it would be something as simple as that. VoidKeyword 111 — 4y
Ad

Answer this question