Hello, I am trying to make a fade in for a gui, I’ve done these before and they are pretty simple. However, this time, whenever there is wait() in the script, the script just stops. It’s waiting, but infinitely. I’ve never had an issue like this where the wait() stops the entire script forever. I know it’s the wait as I’ve used debugs with print commands and I’ve removed the wait to make it work, although that just makes it pop in and not fade in, not what I’m looking for. This script is the exact same script I always use, so it’s odd that it’s not working here. Also before anyone asks, no, there is nothing in the console to help fix this.
Anyways, here is a bit of the script:
remoteEvents.PlayerLeftCave.OnServerEvent:Connect(function(player)
player.PlayerGui.LocalScript.Disabled = true
local gameover = player.PlayerGui.YouLeft
for i = 0,24,1 do
wait(0.041666) --it breaks here.
gameover.Frame.Transparency = gameover.Frame.Transparency - 0.041666
end
Thanks in advance if anyone can help me out!