Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

SetCells not working properly?

Asked by 9 years ago

Okay so, I'm trying to make a lake generator thingy with SetCells, and everything works good in the script, no errors, but the SetCells command isn't working right. The water isn't appearing at all, or atleast it is where I can't see it. Help please?

Code:

local waterY = rimheight
local waterX = p.CFrame.X
local waterZ = p.CFrame.Z
local region = Region3int16.new(
    Vector3int16.new(
        (waterX - 200) / 4, 
        waterY / 4, 
        (waterZ - 200) / 4
    ), 
    Vector3int16.new(
        (waterX + 200) / 4, 
        (waterY - 100) / 4, 
        (waterZ + 200) / 4
    )
)
Workspace.Terrain:SetCells(region, 17, 0, 0)

If you need anything else defined, tell me...

Answer this question