HateSins
(HateSins)
June 21, 2021, 2:55pm
#1
I’ve been working on redesigning a map I was given a while ago. While I was redesigning the game I noticed a lot of useless things and one of those things are useless “values” in almost every part.
Example:
If anyone could give me a script that would remove every value with the same name would really help me out.
5 Likes
Ty_Scripts
(IAmTrulyGreg)
June 21, 2021, 2:58pm
#2
You could run in the command bar:
for i, v in ipairs(workspace:GetDescendants()) do
if v.Name == "yournamehere" then
v:Destroy()
end
end
5 Likes
D0RYU
(nici)
June 21, 2021, 3:03pm
#3
Or you could use the search bar in explorer without having to run code
TDtheTV
(TDtheTV)
June 21, 2021, 3:04pm
#4
That way it’s not that efficient. The reason the command bar exists its to make this kind of stuff easier.
3 Likes
D0RYU
(nici)
June 21, 2021, 3:07pm
#5
I didn’t realize that until now
either way they should check if it’s a value because anything could be named Value but a different class
you could add :IsA() to the if statement
for i, v in ipairs(workspace:GetDescendants()) do
if v.Name == "Value" do
v:Destroy()
end
end
Type this in the command bad as mentioned by @Ty_Scripts . I believe that’s the only way except manually removing the value.
HateSins
(HateSins)
June 21, 2021, 3:20pm
#7
Much appreciated, you saved me a lot of time here.
1 Like
system
(system)
Closed
July 11, 2021, 8:03am
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.