Well, basically, when i was testing my script, it worked, except for one part. ( This is a part of a script in which it checks a match for the GUI in the GUI folder thing and the player in which the GUI is named after. ) I believe i'm doing this a bit wrong, since i'm still learning about functions, return, etc. BTW, the script is in PlayerGui
Anyways, here's the script.
function GetPlayersFromGui(GUI)
for i = 1, #GUI do
GUI[GUI[i]] = true
end
end
local localplayer = script.Parent.Parent
function Checkingfunc()
local GUIers = GetPlayersFromGui(localplayer.PlayerGui.HealthBar:GetChildren())
if GUIers ~= nil then
for i, player in ipairs (game.Players:GetPlayers()) do
local match = GUIers[player.Name]
if not match then
print ("Chacked")
grabplayers(localplayer)
return
end
end
end
end
while true do
Checkingfunc()
print("WTD works!")
wait(5)
end
When i test the script, Checkingfunc() isn't working (Demonstrated by "Chacked" not printing in the output), but when the *while true do * has been triggered, it prints perfectly.
If there's any details, please comment!

1 comment
Try changing match to 'local match = GUIers:FindFirstChild(player.Name)'