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
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.