As like the title said. It's lagging very bad and slow, too.
Code:
function _FILLWATER(x, z)
_CUMULATED = _CUMULATED + 1
for _Y = _Y / _SCALE - 1, -_OFFSET, -1 do
local _PART = Instance.new("Part")
_PART.Anchored = true
_PART.CanCollide = false
_PART.BottomSurface = Enum.SurfaceType.Smooth
_PART.CFrame = CFrame.new(x * _SCALE, (_Y * _SCALE) , z * _SCALE)
_PART.formFactor = Enum.FormFactor.Symmetric
_PART.Name = x ..'-water'
_PART.Transparency = 0.5
_PART.Size = Vector3.new(3, 3, 3)
_PART.TopSurface = Enum.SurfaceType.Smooth
_PART.Parent = _BIN
_ALTDECALS(_PART)
for i, v in pairs (_BIN:GetChildren()) do
if v:IsA('Part') and v.Position == _PART.Position and v.Name ~= x ..'-water' then
_PART:Destroy()
end
end
if _CUMULATED % 32 == 0 then
wait()
end
end
end
The code that actives it:
for _X = 1, _X do
for _Z = 1, _Z do
_FILLWATER(_X, _Z)
end
end

1 comment
Try adding a small wait?