I am trying to make it so when it sends Roblox’s default notification to the client that it plays a sound with it but when I attempted to do it, the script stopped working so I just removed the sound part and it was fixed. Does anyone know a workaround for this?
The script is;
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local StarterGui = game:GetService("StarterGui")
local NotifyPlayer = SilenceManager:WaitForChild("NotifyPlayer")
local function ChatEnabled(Enabled)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, Enabled)
end
local function Notification(Title, Text)
StarterGui:SetCore("SendNotification", {
Title = Title,
Text = Text
})
end
NotifyPlayer.OnClientEvent:Connect(function(Title, Message)
Notification(Title, Message)
end)
ok so, if the audio is in serverstorage a localscript wont be able to access it. because serverscriptservice and serverstorage and seen as empty to localscripts (only if u used a localscript, and not a script.).
Yeah that too, just put the sound somewhere else, even under the notification script would work, not really NEEDED for the sound to be in the serverstorage
As ball stated, a local script will not be able to see the sound inside serverstorage, this is also true for replicated storage, these are only accessible from the server. (This is why people suggest keeping events and important game data in here, to prevent exploiters from touching this data or whatever is in there)
You can do something like this
NotifyPlayer.OnClientEvent:Connect(function(Title, Message)
Notification(Title, Message)
script.NotificationSound:Play() -- Dont forget to add a sound value
end)
About the icons in my explorer, I am using a resource known as “Vanilla 3”
It changes the icons in studio to be more up to date with modern standards.
You can look into it here