In specifics, lets say you get a notification. now 3 seconds later you get a NEW one. the NEW one only lasts for 2 seconds because the other one already started, and was going to dissapear in 5 seconds. but because of that, it causes the new one to dissapear in 2.
Here is the script:
local frame = script.Parent
local Reason = game.ReplicatedStorage.CMDErrorSender
local Error = script.Parent.Sound
local yes = script.Parent.Sound2
local HB = script.Parent.HelpButton
local ClickSound = script.Parent.Click
Reason.OnClientEvent:Connect(function(Why, IfWorked)
frame.Reason.Text = Why
frame.Visible = true
if IfWorked == true then
frame.TextLabel.Text = "Yuh uh"
frame.Reason.Text = Why
yes:Play()
if Why == "Click the arrow to open the Command instructions!" then
HB.Visible = true
end
else
Error:Play()
end
task.wait(5)
HB.Visible = false
frame.Visible = false
frame.TextLabel.Text = "NUH UH"
end)
HB.MouseButton1Click:Connect(function()
--resetting notification
frame.Visible = false
HB.Visible = false
frame.TextLabel.Text = "NUH UH"
--the rest
ClickSound:Play()
end)
Thanks!