#notification (above)

1 messages · Page 1 of 1 (latest)

errant edge
#
--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?
trail sand
errant edge
#

this is a local script

#

and i'm about to change it to solved

trail sand
#

LOL

#

i thought it was a module

#

😭

errant edge
#

gotta read it all the way

trail sand
#

but is there any errors in the output?

errant edge
#

thanks for atleast trying

#

no errors

#

but it is solved

trail sand
#

ah

#

i see

#

alright alright