Let me go into more detail. I have the classic ROBLOX sword in StarterPack and I want to make it so it can only hit zombies but not other players. Is this possible? All help is appreciated.
you just have to add an if statement in the roblox sword that looks something like this
local sword = script.Parent --the variable of the sword local hum = game.Players.LocalPlayer sword.Touched:Connect(function(hit)--touched event local zombie = --here you get the npc you have --as an example "local part = game.workspace if zombie then --take from the npc's health end if hum then --take 0 hp from the player when it is hit by the sword end end)
If you found my answer helpful please consider hitting that accept answer button and hit me up if you need any more help.Have a nice day!