I'm trying to make this shield that defends against bullets and paintballs, but it isn't working!
function onTouched(part) if part.Name == "Bullet" or "Paintball" then Shield = Instance.New("Part") Shield.Size = Vector3.new(.2,.2,.2) Shield.CanCollide = false Shield.Parent = game.Workspace Shield.BrickColor = ("Really red") Shield.Position = script.Parent local mesher = Instance.new("BlockMesh") mesher.Parent = Shield mesher.Scale = Vector3.new(0.2, 0.2, (script.Parent.Position - onTouched(part).Position).magnitude) explosion = Instance.new("Explosion") explosion.Parent = game.Workspace explosion.Position = part wait(1) part:remove() end end
Isn't the method at the end of your script wrong? part:remove() isn't a method.
part:Remove()
is a method, other than that I don't know how to help.