#Trying to make a modular weapon system, having issues on part placement

1 messages · Page 1 of 1 (latest)

jolly pulsar
#

How do I snap the pieces to the other pieces

bronze harbor
#

You will weld but also mark the points where you want to connect each part

#

@jolly pulsar

#

Attachments

jolly pulsar
loud dewBOT
#

studio** You are now Level 2! **studio

jolly pulsar
#

letm me try it again I guess

bronze harbor
#

Show me what u got

#

A picture?

jolly pulsar
#

uh yeah just gimme a few mins to write the script I deleted the most of the old code

#

so, how do I snap the parts side to another parts side when Im welding

#

because wont they just be connected but away from each other

bronze harbor
#

You have to set the position too

#

let me see

jolly pulsar
#

alright heres the script I have so far

#

like everything get welded just I dont know how to make the parts go together

bronze harbor
#

set the position

#

or cframe

jolly pulsar
#

but how do I make it snap on the top or something, it just goes to the point acording to the middle of the part thats pivoting to that point

#

and since every part has a different size and stuff I cant just like have a stagnant offset

proven sable
#

I think it’s weld.C0 or something u can manipulate to move where the weld point is

jolly pulsar
#

wouldnt that just move the middle of a part to that weld point though?

proven sable
#

You’ll probably want to make this a modular system using module scripts and not have everything inside of one script, unless ur just testing the weld logic

proven sable
loud dewBOT
#

studio** You are now Level 4! **studio

jolly pulsar
jolly pulsar
#

oh wait shoot that doesnt work for multipart models

#

uhhh give a me a few mins

#

okay that kinda worked!

#

could get weird for some parts though

proven sable
#

I assume the top piece is all one part, for the sphere the actual size may be bigger than how it looks which could affect the offset, also make sure ur using each instance’s size for the offset, not just one. If u want to connect the sphere and top part to the middle stick then u need to only use that middle stick instances size

jolly pulsar
#

I think that works a treat though which is good, I just have to give a value to all the parts is all

jolly pulsar
#

but it was simple once I got it

#

tyms!

#

tysm!*

proven sable
#

Alright, good luck with ur system. I’m also making a sort of similar system for my game right now as well.

jolly pulsar
#

ohhh nice

#

what kind

proven sable
#

It’s modular as well, where you can mix and match pieces. But parts can only connect to special connector pieces which will probably be only cloth and leather parts, maybe I’ll add a blade guard that only blades and other connector pieces can connect to as well

jolly pulsar
#

nice, look foward to seeing it if you release it then

#

what kind of game is it? rn Im going for a pirate one with modular flintlocks as well and stuff (which is def gonna be way more complicated to snap to, so like would it use a similar system or? like would I just divide by 2 again, maybe its not complicated Idk)

proven sable
#

It’s a survival game, I plan to be able to have all items be modular. Like you can make a custom belt or backpack to hold or connect items to, or you can attach metal resources that are forged in the shape of a helmet to a leather connector piece which connects the full helmet to the character

#

I plan to only have leather and cloth pieces connect to the characters body

#

But it will work well for my game since my game’s item system will have traits and such that are dependent on the resources the item is comprised of

#

Like some resources have special effects like metal from a lava/volcanic region is naturally high temperature which can damage players with a burn debuff

jolly pulsar
#

that sounds awesome, Im going for a similar ish thing but not as complicated, Im gonna mark this as solved now tysm for your help and gl on your game!

loud dewBOT
#

studio** You are now Level 3! **studio