Repeat Fast Mode Code Wont Repeat

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Keep repeating fast mode code

  2. What is the issue? Include screenshots / videos if possible!
    Using a repeat statement doesnt do anything.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    dev forums

Code:

function Stuff()
	repeat
		task.wait()
		for key, object in pairs(workspace:GetDescendants()) do
			if object:IsA("Part") then
				object.Material = Enum.Material.SmoothPlastic
			elseif object:IsA("MeshPart") then
				object.Material = Enum.Material.SmoothPlastic
				--object.TextureId = nil
			elseif object:IsA("Texture") then
				object:Destroy()
			end
		end

		for key, object in pairs(game.ServerStorage:GetDescendants()) do
			if object:IsA("Part") then
				object.Material = Enum.Material.SmoothPlastic
			elseif object:IsA("MeshPart") then
				object.Material = Enum.Material.SmoothPlastic
				--object.TextureId = nil
			elseif object:IsA("Texture") then
				object:Destroy()
			end
		end
		game.Lighting.GlobalShadows = false
		
	until
	task.wait()
end

script.Parent.Activated:Connect(Stuff)

Did you try while task.wait() do?

Hey, Its working now! Thanks alot.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.