Hey there!
I’m trying to make a script that detects if a player has a certain starter character, since my game has 3 different choices. When the player touches a part, it looks for the starter character, and if it is a certain one, it does no damage to the player, otherwise it does do damage. However, I haven’t gotten it to work, and would appreciate some help!
My script:
script.Parent.Touched:connect(function(part)
if part.Parent:FindFirstChild("Humanoid") then
if part.Parent:FindFirstChild == "StarterCharacter" or "StarterCharacter3" then
print("heh")
else
wait()
part.Parent.Humanoid:TakeDamage(1)
end
end
end)