I'm trying to test of making a notification. I kept getting this error (Unable to cast value to Object). The error is on Line 5 of the server script.
Use both scripts if needed:
--]]//SERVER SCRIPT\\[[--
local RS = game:GetService("ReplicatedStorage")
local noti = RS.RemoteEvents:WaitForChild("Notify")
game.Players.PlayerAdded:Connect(function()
noti:FireClient("Test", "Hello.")
end)
--]]//LOCAL SCRIPT\\[[--
local RS = game:GetService("ReplicatedStorage")
local noti = RS.RemoteEvents:WaitForChild("Notify")
local SG = game:GetService("StarterGui")
noti.OnClientEvent:Connect(function(Title, Text)
SG:SetCore("SendNotification", {
Title = Title;
Text = Text;
})
end)

1 comment
Thanks :D