lemme try yours, how do i set it up
no, its continuing the loop if its one of those things
Put it inside a script
done
char limit
sorry, in the copiedMap variable, im using a lowercase c instead of a uppercase C so replace it with this:
local copiedMap = game.ServerStorage:FindFirstChild('CopiedMap')
Der arme
ok ill plug that in rqchar limit
if we break it it will just skip the entire loop, thats not what we want, we want to go to the next value.
wait i noticed another issue, in the last for loop you need to use copiedMap:GetChildren()
not just copiedMap:
for i, v in ipairs(copiedMap:GetChildren()) do
v.Parent = workspace
end
i dont see any change, can you add a little delay so i can see the map reset?
just add a task.wait() between the loops:
for i, v in ipairs(workspace:GetChildren()) do
if v.Name == 'Terrain' or v.Name == 'Camera' or game.Players:GetPlayerFromCharacter(v) then continue end
v:Destroy()
end
task.wait(3)
for i, v in ipairs(copiedMap:GetChildren()) do
v.Parent = workspace
end
where do i put this?
char limit
my last post includes the change, so you can try and use it now
didnt know how to set it up, and he gave a solution to his error
Just put it inside Script peinlich vallah
Yes, its doing exactly as its supposed to do, i even tested it
can you make it activated by a clickdetector?
its blacklisting them, not whitelisting them
i made a separate part for your script, can you make it clickdetector activated?
local clickDetector = workspace.ClickDetectorPart.ClickDetector
local resetFolder = Instance.new("Folder")
resetFolder.Parent = game:GetService("ServerStorage")
for index, value in pairs(workspace:GetChildren()) do
if not value:IsA("Camera") and not value:IsA("Terrain") and not value:FindFirstChild("Humanoid") then
local clonedInstance = value:Clone()
clonedInstance.Parent = resetFolder
end
end
clickDetector.MouseClick:Connect(function()
for index, value in pairs(workspace:GetChildren()) do
if not value:IsA("Camera") and not value:IsA("Terrain") and not value:FindFirstChild("Humanoid") then
value:Destroy()
end
end
for index, value in pairs(resetFolder:GetChildren()) do
local clonedValue = value:Clone()
clonedValue.Parent = workspace
end
script.Enabled = false
script.Enabled = true
end)