I am starting to develop a server-side anti-cheat. For some things, it needs to constantly check for instances in the player character. The code I currently have does not work for some reason. I have a feeling you can’t add a while loop to a PlayerAdded event.
This script is what I am currently using. The print is here to check if it actually works.
game.Players.PlayerAdded:Connect(function(plr)
while wait(1) do
print(plr.Name)
end
end)
The FE god module for example must constantly check if a part is still in the player’s character.