How can i make a grid, plot, saving, rotating placement system?

I would like to make it so that i can click a gui and then go into building, and i can rotate the part by pressing r and then it moves by a stud when i move my mouse around. And i can only place it on my plot, which you will need to claim it. And then i can press a save gui button and then when i leave the game and rejoin and claim a plot i can then press a gui button to load all the stuff i built. I’ve tried devforum and YT but nothing. ):

Please don’t ask people to make Scripts or Systems for you, its the Rules:

Please do not ask people to write entire scripts or design entire systems for you. If you can't answer the three questions above, you should probably pick a different category.

I’m not asking for scripts, i would like to get an idea about it, im an intermediate at scripting, and i could figure the rest out, all i need is hints and that to help me start it.

1 Like

Check out EgoMoose’s Furniture Placement System. It really helped me make a grid-based placement system

To do this, you can use a Serialization method like so:

local data = {}

local function serialize(parts) -- part serializer
   for _, v in parts do
      table.insert(data, {
         color = {v.Color.R, v.Color.G, v.Color.B};
         position = {v.Position.X, v.Position.Y, v.Position.Z};
         orientation = {v.Orientation.X, v.Orientation.Y, v.Orientation.Z}
      })
   end
end
3 Likes

To make a grid you could either use a huge block that would have a grid like texture. You could also make it so blocks would represent the lines from a position to another, however I do not really recommend this as it means that you would render some blocks depending on the size of the whole grid.
As for a plot you could just mark a region as an owned plot by somebody.

Here is a video on how to make a placement system.

1 Like

if you really wan’t to start with that, make sure you know how to serialize and save tables and load it with loop, next try to make building system without grid or with it, if you wan’t to rotate make input that rotates placing block by X degree. it’s simple plan for that, try to learn some trigonometry and a lot of math to understand what and how you doing it.

So i’m just asking for a lil help in this, please.

If you need a starting point i can give you a lil help. (note, this is just a basic example, you could make this better)

*local p = game.Players.LocalPlayer

local cam = workspace.CurrentCamera

local mouse = p:GetMouse()

local part = Instance.new(“Part”, workspace)

local part2 = Instance.new(“Part”, workspace)

local part3 = Instance.new(“Part”, workspace)

local part4 = Instance.new(“Part”, workspace)

part.Size = Vector3.new(8,8,8)

part2.Size = Vector3.new(8,8,8)

part3.Size = Vector3.new(8,8,8)

part4.Size = Vector3.new(8,8,8)

part.CFrame = cam.CFrame

part2.CFrame = cam.CFrame

part3.CFrame = cam.CFrame

part4.CFrame = cam.CFrame

mouse.Button1Down:Connect(function()

part.CFrame = cam.CFrame

part2.CFrame = cam.CFrame

part3.CFrame = cam.CFrame

part4.CFrame = cam.CFrame

end)

mouse.KeyDown:Connect(function(key)

if key == “r” then

local r = part.CFrame

part.CFrame = CFrame.new(r.p, r.p + Vector3.new(1,0,0))

part2.CFrame = CFrame.new(r.p, r.p + Vector3.new(0,0,1))

part3.CFrame = CFrame.new(r.p, r.p + Vector3.new(-1,0,0))

part4.CFrame = CFrame.new(r.p, r.p + Vector3.new(0,0,-1))

end

1 Like