I am trying to find a way to locally destroy parts called “Waypoint” without grouping them into a Model. My aim is to delete the “Waypoint” blocks locally on players that have role id less than 10 (not a staff member) and do nothing if the player has role id greater than or equal to 10 (a staff member role).
Here is the LocalScript added in StarterPlayerScripts where I have to locally delete “Waypoint” parts if user is not a staff member (role id less than 10).
local player=game.Players.LocalPlayer
local rank = player:GetRankInGroup(12646662)
if rank >= 10 then
warn("User is staff, waypoint is shown.")
elseif rank < 10 then
-- Delete all of "Waypoint" bricks in Workspace.
end
end
Question is, how do I delete all of the parts called “Waypoint” in Workspace without putting them inside a grouped Model/Folder? Thank you.