--local script
local Music = game.ReplicatedStorage.Music local ReplicatedStorage = game:GetService("ReplicatedStorage") local function Musicer(player, Musics) script.Playing.Value = Musics -- then add meaning to the variable if(script.Playing.Value == true)then script.Playing.Value = false script.Sound:Play() end end Music.OnClientEvent:Connect(Musicer)
--Script
local RP = game.ReplicatedStorage local Music = RP:WaitForChild("Music") script.Parent.Touched:Connect(function(hit) if(hit.Parent:WaitForChild("Humanoid"))then local player = game.Players:GetPlayerFromCharacter(hit.Parent) Music:FireClient(player, script.Playing.Value) end end)
There is no error is that it is not working either.