- What do you want to achieve? Keep it simple and clear!
So, what I am trying to do is really simple. I am making a game similar to “Waste Of Space” on ROBLOX, which is space engineering game, and you can simply do something like drag solar panel to touch powercell, and it gets powered.
(A IMAGE OF POWERCELL AND SOLAR PANEL CHARGER FOR VISUALIZATION PURPOSES)
- What is the issue? Include screenshots / videos if possible!
Like Waste Of Space does, my game also uses drag tool, which welds any unanchored part to other part, making it welded together. I am trying to make a script where I can search through the object A’ (Solar panel)'s children for welds linked to object B (powercell), then if there’s weld, check if it’s named something like “Powercell”,. and make a function replying to that weld connection such as making powercell “charged” from solarpanel. As you can see, that would be really difficult to achieve. Unless you know something I don’t.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried everything, really but I can’t figure it out, the script simply just refuse to find any welds in object and do something with it, nor even accessing that weld’s connected part if found… Nothing works. I searched through countless APIs/methods in ROBLOX documentation, and really can’t think of anything.
I really desperately need help with this, and I would greatly appreciate any tip-offs or any kind of help generally, I just hope I can get this solved overnight. Thanks!
edit for clarification: I do NOT know how to make script for checking through all children. I am not THAT good at scripting, and all of my objects in game is one-part model with decals on it, it’s not a multi-part model. I tried my best to understand this but it’s a problem that I simply can’t solve.