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
.
1 | if not player.PlayerGui:FindFirstChild( 'SpeechGuiNPC01' ) then |
2 | --// Do stuff |
3 | end ; |
Hope this helped.
Read more about logical operators (such as not
).