--services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
--folder
local upStuff = ReplicatedStorage:WaitForChild("UpNotification")
--objects
local bindable = upStuff:WaitForChild("Bindable")
local remote = upStuff:WaitForChild("Remote")
--player
local player = Players.LocalPlayer
--GUI
local frame = player:WaitForChild("PlayerGui"):WaitForChild("MainGui"):WaitForChild("UpNotification")
local template = frame:WaitForChild("Template")
local function CreateNotification(text: String, textColor)
if textColor == "green" then
textColor = Color3.new(0, 1, 0)
elseif textColor == "red" then
textColor = Color3.new(1, 0, 0)
elseif textColor == "purple" then
textColor = Color3.fromRGB(234, 73, 255)
end
local notif = template:Clone()
notif.Text = text
notif.TextColor3 = textColor
notif.Parent = frame
local sizeTween = TweenService:Create(notif, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.fromScale(1, 0.3)})
sizeTween:Play()
task.wait(5.5)
local transparencyTween = TweenService:Create(notif, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In), {TextTransparency = 1})
transparencyTween:Play()
transparencyTween.Completed:Connect(function()
notif:Destroy()
end)
end
bindable.Event:Connect(function(text, textColor)
CreateNotification(text, textColor)
end)
remote.OnClientEvent:Connect(function(text, textColor)
CreateNotification(text, textColor)
end)```
that is my local-side notification script that comes up. why doesn't it work?
#notification (above)
1 messages · Page 1 of 1 (latest)
have you checked on if it works alone on a local script?
gotta read it all the way
but is there any errors in the output?