I am trying to make a custom force field script. where when someone touches the force field they die. But, when someone touches it, it never kills them.
here is what I have
force1.Touched:Connect(function(hit)
if hit.Parent.Humanoid or hit.Parent.Parent.Humanoid then
if hit.Parent.Name ~= plr.Name then
hit:Destroy()
end
end
end)
force2.Touched:Connect(function(hit)
if hit.Parent.Humanoid or hit.Parent.Parent.Humanoid then
if hit.Parent.Name ~= plr.Name then
hit:Destroy()
end
end
end)
force3.Touched:Connect(function(hit)
if hit.Parent.Humanoid or hit.Parent.Parent.Humanoid then
if hit.Parent.Name ~= plr.Name then
hit:Destroy()
end
end
end)
it does not give an error but it doesnt work can someone help please?

3 comments
What is the "plr" and why do you make an 'if statement' checking if it is not equal to the name of the person who touched it?
dude u cant actually touch a forcefield
its not an actual forcefield object its a part welded ti the players torso that is a circle that will act as a forcefield