Script helping playergui

while wait(1) do
if not script.Parent.Parent.PlayerGui:GetChildren().Name == “BubbleChat” then
game:GetService(“ReplicatedStorage”).ExAn:FireServer(script.Parent.Parent.Name , “Script Injection”)
end
end

i will add another things but not now.

My problem: why does not detect anything?

SPSss

What exactly are you doing with this…? Couldn’t it just be easier to reference the LocalPlayer…? Also you’re comparing a table with a string, which makes no sense whatsoever

local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")

while wait(1) do
    if not PlayerGui.Name == "BubbleChat" then
        game:GetService("ReplicatedStorage"):WaitForChild("ExAn"):FireServer(Player.Name, "Script Injection")
    end
end