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

Please look for spelling or wrong things in this script. I need to know where I went wrong?

script.Parent.ClickDetector.MouseClick:connect(function(hit)
repeat wait(0.01) hit.PlayerGui.Tele.Slot.Datteledoe.BackgroundTransparency = hit.PlayerGui.Tele.Slot.Datteledoe.BackgroundTransparency + 0.01 until hit.PlayerGui.Tele.Slot.Datteledoe.BackgroundTransparency >= 1
	hit.PlayerGui.Tele.Slot.Datteledoe.BackgroundTransparency = 0
	hit.PlayerGui.Tele.Slot.Datteledoe.Visible = false
end)
It stays pitch black instead of turning invisible. Please help me?

1 answer

✓ Accepted answer
local part = script.Parent
local click = part["ClickDetector"]

cnnct = click.MouseClick:connect(function(player)
 -- So we can disconnect, instead of using a debounce. 
	if player.PlayerGui:findFirstChild('Tele') then
		-- Make sure it's even there.  
		cnnct:disconnect() 
		-- You aren't using it again, so just disconnect it. 
		local dir = player.PlayerGui.Tele.Slot.Datteledoe
		for i = dir.BackgroundTransparency, 1, .1 do
			-- start, stop, increment
			dir.BackgroundTransparency = i 
			wait()
		end
		dir.Visible = false
	end
end)

1 comment

0

thanks!

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