I'm trying to make it like a party system where certain players don't get damaged but it doesn't work. IDK why ve been trying different things for 45 mins or so and I'm lost.
script.Parent.Touched:Connect(function(hit) print("TOUCHED") local nokill = {"hellericc","TestSub"} for i,v in pairs(nokill) do local x = Instance.new("StringValue",game.Workspace.Xhels) x.Name = v print(nokill) if hit.Parent == v.Name then print(hit.Parent) else wait(1) print("Killing") hit:Destroy() end end end)
Hi! In the loop you put v.Name where the string value v does not have the property name, change v.Name to v and it should work fine.