Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

this repeat wait until loop keep going after the transparancy has hit 0 how to fix this?

--//Varibles\\--
local Plr = game.Players.LocalPlayer
local repStorage = game:GetService("ReplicatedStorage")
local RemoteFolder = repStorage:WaitForChild("RemoteEvents")
local UI = Plr:WaitForChild("PlayerGui")
local Gui = UI:WaitForChild("PlrUI")

local function TextRemote()
	repeat wait(0.01)
        Gui.Title.TextTransparency = Gui.Title.TextTransparency - 0.01
		Gui.Title.Title.TextTransparency = Gui.Title.Title.TextTransparency - 0.01
		until Gui.Title.TextTransparency == 0 do
	end
end


RemoteFolder.TextRemote.OnClientEvent:Connect(TextRemote)

It keeps going until the transparancy is in the -1 and it just keeps going

3 comments

0

Gonna be honest, i don't see any problems with the code but you have "Gui.Title.Title" and I'm not sure if your checking the right thing or your 'Text Remote' is broken. Also, your using a specific value, try using > or < to try and identify it if it still isn't working. The reason i won't give this as an answer is because I'm uncertain whether it's helpful or not.

0

Those are some nasty names.

0

you should also try to use a numeric for loop

1 answer

✓ Accepted answer

I would recommend doing

until Gui.Title.TextTransparency <= 0

this way, if it by chance goes past 0, it will still stop, I have run into this problem before so this should help. and if your trying to make it become less transparent faster replace

wait(0.01)

with

wait()

this will work without crashing your game

This discussion is preserved as it was. New answers, comments, and votes are closed.