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

Gui remover when it appears?

This is a local script located in StartGui,but it will be only for one team. I have a flash grenade tool,and I want the team called "S.W.A.T" not to be affected by the flash, so, this script should remove the GUI instantly, but, it doesn't work, why?

The "GuiMain" isn't located in StartGui, it appears when the grenade flashes you. Filtering Enabled.

while true do
	if script.Parent.GuiMain.Disabled == false then
		script.Parent.GuiMain:Destroy()
	end
end

1 comment

0

lol poor guy

1 answer

Might want to add a ~~~~~~~~~~~~~~~~~ wait()

in the while loop. Also, if the GuiMain isn't located in StarterGui then you can't locate it. Instead, in the grenade script, check if the player's team is S.W.A.T and if it is then the GUI showing code doesn't run as well as the damage code.

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