I tried using this: if plyr.PlayerGui.SpeechGuiNPC01 ~= nil then
But it didn't work. I'm trying to make sure this specific Gui is not inside of the PlayerGui before it performs an action. How should I rewrite this?
Your best bet would be to use FindFirstChild
.
if not player.PlayerGui:FindFirstChild('SpeechGuiNPC01') then --// Do stuff end;
Hope this helped.
Read more about logical operators (such as not
).