Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i remove Parts only named in certains names?

Asked by 5 years ago

This script is located at spawn, But players still can place parts named Brick1 But the script does not remove the Part that its desired to remove, What is my error to in pairs getting the childrens?

while game:GetService("RunService").Heartbeat:wait() do
    for i, v in pairs(game.workspace:GetChildren()) do
        if v and v.Name == "Brick1" and (v.Position - script.Parent.Position).magnitude <= 350 then
            v:remove()
        else
        end
    end
end

0
Are the parts that the players build made on server or client side? DarkageMast3r 140 — 5y
0
The players will click anywhere to spawn the block from the As a local script into the workspace, But I need the script to remove the blocks by the spawn with the name "Brick1" To be remove them to stop spawn cluster S0NIC_Dev 61 — 5y
0
So are the bricks created by a local script? If yes then make it a serverscript since it will only be seen local tp the player HomieFirePGN 137 — 5y
0
to* HomieFirePGN 137 — 5y

Answer this question