Prevent players attacking other players with a in-game guns

Hi. Yesterday, I made a boss fight game: [RELEASED] BOSS FIGHTS - Roblox. Everything is working fine, but you can damage other players with a gun. Can I somehow disable it? Help!

Alright, I solved it just by adding a thing that will check NPC’s name if you hit them with the gun.

The best way to check if it is a player or not is to use Players:GetPlayerFromCharacter(Model). Your solution can end up with a player with the same username as the NPC’s name being able to be killed and you want to avoid that!

I already did that. But anyways, thanks!

1 Like