-- Getting Values From RS --
local Local = game.ReplicatedStorage:WaitForChild("NotifFolder"):WaitForChild("Local-Local Notifs")
local Server = game.ReplicatedStorage:WaitForChild("NotifFolder"):WaitForChild("Server-Local Notifs")
local Settings = game.ReplicatedStorage:WaitForChild("NotifFolder"):WaitForChild("Settings")
-- Getting Settings From RS --
local Enabled = Settings.Enabled
local Animated = Settings.Animated
local Pos = Settings["Pos (left, right)"]
-- Getting servies --
local Tween = game:GetService("TweenService")
-- Getting UI --
local NotifMain = script.Parent.Notif
local Head = NotifMain.Head
local Body = NotifMain.Body
local OptinalButt = NotifMain.OptinalButton
local TEMP = script.Parent.TEMP
local Que = script.Parent.Notif.Que
-- Local functions --
local function AddToQue(Headtxt, Bodytxt, ButtonEnabled)
local NewQueVals = TEMP.Qued:Clone()
if Headtxt ~= nil then
NewQueVals.Head.Value = Headtxt
else
NewQueVals.Head.Value = "Unable to load STRING"
end
if Bodytxt ~= nil then
NewQueVals.Body.Value = Bodytxt
else
NewQueVals.Body.Value = "Unable to load STRING"
end
NewQueVals.Button.Value = ButtonEnabled
end
local function MakeNewNotif(Headtxt, Bodytxt, ButtonOn)
NotifMain.Visible = true
Head.Text = Headtxt
Body.Text = Bodytxt
if ButtonOn == true then
OptinalButt.Visible = true
else
OptinalButt.Visible = false
end
task.wait(3)
NotifMain.Visible = false
end
-- Script --
Server.OnClientEvent:Connect(function(HeadText, BodyText, ButtonOn)
local ButOn = nil
string.lower(ButtonOn)
if ButtonOn == "yes" then
ButOn = true
elseif ButtonOn == "no" then
ButOn = false
end
AddToQue(HeadText, BodyText, ButOn)
end)
Local.Event:Connect(function(HeadText, BodyText, ButtonOn)
local ButOn = nil
string.lower(ButtonOn)
if ButtonOn == "yes" then
ButOn = true
elseif ButtonOn == "no" then
ButOn = false
end
AddToQue(HeadText, BodyText, ButOn)
end)
Que.ChildAdded:Connect(function(Child)
local Hed = nil
local Bod = nil
local But = nil
if Child:IsA("Folder") and Child.Name == "Qued" then
for _, V in pairs(Child:GetChildren()) do
if V:IsA("StringValue") then
if V.Name == "Body" then
Bod = V.Value
elseif V.Name == "Head" then
Hed = V.Value
end
elseif V:IsA("BoolValue") then
if V.Name == "Button" then
But = V.Value
end
end
end
end
MakeNewNotif(Hed, Bod, But)
task.wait(3.5)
end)
Idk what to say, i have a script that fires the event and it should make a notif appear, it does not.
No errors or anything so idk whats wrong