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

how can I get the postition too? EDIT:SOLVED

Asked by
Hero_ic 502 Moderation Voter
9 years ago

EDIT:One of my friends helped me solve the problem can you please close this post?

So I was making this generation script that generates blocks in the serverstorage to the size and position of a part I made in workspace which works almost perfect. The main problem is that I do not know how to actually get it to the correct exact position this part is can you help me?

for x = 3 , workspace["Mining Gen Area"].Size.X-16 do
    for z = 3 , workspace["Mining Gen Area"].Size.Z-16 do 
        local part = game.ServerStorage["Terrain Blocks"].Dirt:Clone()
        part.Parent = workspace["Terrain Top"]
        part:SetPrimaryPartCFrame(CFrame.new(x*part.PrimaryPart.Size.X,workspace["Mining Gen Area"].CFrame.Y,z*part.PrimaryPart.Size.Z))
    end
end

https://i.gyazo.com/ebff199464248db9a74a802d537fb0e7.png

if you helped thanks ~KIHeros

0
local position = part.CFrame.p? TheDeadlyPanther 2460 — 9y
0
I want it to the position of the highlighted object in the image. which is how it gets the size it is in the first place. Hero_ic 502 — 9y

Answer this question