Basically I am trying to get the same effect as in Clean Up Roblox where you can have 20 person severs. In the game you have the Roblox laser blaster. Now I want this to kill the npc with humanoids, but not the players to kill each other.
It checks if the part that was detected is part of a player’s character, if so then exit the function using return
In the case of laser blasters it most likely will be using raycast’s so you can check first if the basepart instance that got hit is the descendant of a model and check if that character model is a player’s character, if so then exit the function.
Your uh, damage cript, before you damage a “humanoid” check if they are a player, and then if they are a player “game.Players:GetPlayerFromCharacter(h.Parent)” stop the code/ dont kill the player,
l would uze return
You could just change the name of the enemy’s humanoid (for example “ZHumanoid”) and every time you need to reference an enemy, you could just type: