Exploiter issue

Hey, so I have a custom HP bar and a custom name tag system.
image
It is a child of the players head in their character, but the problem is that an exploiter can quite easily delete it and others won’t know who he is and what his HP is, do you have any ideas how to prevent this?

You could make each client create the players’ name tags instead of the server

@Premedius deleting things in your character replicates to the server

3 Likes

Oh that’s something I didn’t know, I appreciate it.

Can I make the server clone it if it is deleted somehow?

You could, but the exploiter can loop delete the name tag and potentially lag the server. I suggest you create the name tags on the client and handle the players’ health updates on the client with remote events.

If you still want to clone it back when it’s deleted, then you can use an event listener to listen for when the name tag is removed on the server (DescendantRemoving or AncestryChanged or something)

ex:

players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        local tag = serverStorage.Tag:Clone()
        tag.Parent = char.Head

        tag.AncestryChanged:Connect(function()
            tag:Clone().Parent = char.Head
        end)
    end)
end)