#Moving frames to the edge of a cube

1 messages · Page 1 of 1 (latest)

gleaming oasis
#

Making a game where cubes can be different sizes, i have a template in server storage, and that template gets cloned and modified each time a cube spawn is triggered (check image to see template).

Main issue: the frames aren't at the edges of the bigger spawned cubes ( i need help on how to do that), but they are correctly scaled

Bellow are 2 modules and a server script:

gleaming oasis
#

Not hardcoded please, so it works for the bigger variety of sizes I will add in the future

fast jolt
glacial walrus
#

I don

#

Uh

#

I assume u want 'em scaled?

fast jolt
#

yeah he needs his frames scaled

#

but i think its cuz hes only welding his stuff.

stark brambleBOT
#

studio** You are now Level 22! **studio

fast jolt
#

he can make it all 1 mesh

gleaming oasis
fast jolt
#

cuz i think maknig a mesh with different parts IS a union

gleaming oasis
#

wait, will i be able to change the colour/transparency/etc of the union

glacial walrus
#

Or maybe just scale a model? not the part inside of a model?

fast jolt
#

i believe you can as long as the union doesnt become 1 part total

gleaming oasis
#

thx for all the options, will get back to yall whenever i attempt

fast jolt
#

alright

gleaming oasis
#

that will be tomorrow since today i did enough and i don't wanna overdo it

fast jolt
#

ill try to put your problem into my hands, i will form a cube with frames that uses welds and try the methods for you

gleaming oasis
#

you don't have to, i will handle it just fine

fast jolt
#

well i already have studio opened so

glacial walrus
#

For me it works just fine

#

Or maybe i don't really get his problem

gleaming oasis
fast jolt
#

ok i have made the cube, does it look correct?

gleaming oasis
fast jolt
#

all of them have weldcontraints too

#

im using your format:
Model
v
Folder
v
Frame Parts
v
weld contraint
Main cube

#

and yes

#

when i scaled the model it worked.

carmine aspen
#

model:scaleto

#

?

#

ya just use model:scaleto

#

this will not work ```lua
-- ===============================
-- APPLY SIZE FROM CubeDefinitions
-- ===============================

spawnedCube.baseCube.Size = originalBaseSize * sizeDef.Scale

for _, frame in ipairs(spawnedCube.Frames:GetChildren()) do

    if frame:IsA("BasePart") then

        frame.Size = frame.Size * sizeDef.Scale

    end

end```
gleaming oasis
#

@fast jolt @glacial walrus ^

#

but now i have another problem

#

why are the cubes spawning and moving in any direction except down?

#

I even tried anchoring the template's mainpart, and then unanchoring after pivoting

#

same issue

gleaming oasis
#

e

gleaming oasis
#

nvm i figured it out