Hello! I know I just posted on here, but I ran into another problem.
In my game, you get notifications whenever something happens. The bar to open up your phone menu extends, and the bell icon and notification fade in. However, it only ever seems to make the two items visible before stopping. Here is the code:
-- functions
function fadein(object, tpvalue)
repeat wait(0.1)
object[tpvalue] = object[tpvalue] - 0.2
until object[tpvalue] == 0
end
function fadeout(object, tpvalue)
repeat wait(0.1)
object[tpvalue] = object[tpvalue] + 0.2
until object[tpvalue] == 1
end
-- code
replicated.Events.NotifEvent.OnClientEvent:Connect(function()
notifsound:Play()
script.Parent.Roundify:TweenSize(UDim2.new(16.384, 24, 0.52, 24), "Out", "Quint", 1, true)
wait(1)
print("doing stuff...")
bellicon.Visible = true
script.Parent.textval.Visible = true
print("I have completed 1 stuff(s)")
fadein(bellicon, "ImageTransparency")
fadein(script.Parent.textval, "TextTransparency")
print("I have completed 2 stuff(s)")
print("did stuff")
wait(3)
print("doing things...")
fadeout(bellicon, "ImageTransparency")
fadeout(script.Parent.textval, "TextTransparency")
print("I have completed 1 thing(s)")
bellicon.Visible = false
script.Parent.textval.Visible = false
print("I have completed 2 thing(s)")
wait(1)
print("Tasks complete!")
script.Parent.Roundify:TweenSize(UDim2.new(3.57, 24, 0.52, 24), "In", "Quint", 1, true)
end)
The script only prints “I have completed 1 stuff(s)” before stopping entirely. This is a LocalScript on the client btw. Any help would be appreciated!