I don't work with repeats a lot so I don't know how to do this...
script.Parent.Touched:connect(function(h) local player = game.Players:FindFirstChild(h.Parent.Name) local gui = Instance.new("ScreenGui", player.PlayerGui) local frame = Instance.new("Frame") frame.Size = UDim2.new(1, 0, 1, 0) frame.Parent = gui frame.BackgroundColor3 = Color3.new(255,255,255) wait(3) repeat frame.BackgroundTransparency = frame.BackgroundTransparency+.1 wait(1) until frame.BackgroundTransparency == 1 gui:remove() end)
This is the part that won't work...
repeat frame.BackgroundTransparency = frame.BackgroundTransparency+.1 --Not full script wait(1) until frame.BackgroundTransparency == 1 gui:remove()
Why won't this stop? I tried to add a "then" but it doesn't work. It won't delete the gui and it won't stop adding the BackgroundTransparency even after it reaches 1. Help would be appreciated! Explanation too!