|
| 23 Aug 2015 01:36 PM |
I'm new to scripting, and I'm trying to weld two unanchored parts together, so it doesn't fall apart by itself. I got this script from the wiki, and it partially works, but it just makes part b go through part a, in a different CFrame than it looks before the script runs. If anyone knows what I have to add to it, some help would be appreciated :)
local function weldBetween(a, b) --Make a new Weld and Parent it to a. local weld = Instance.new("ManualWeld", a) weld.Part0 = a weld.Part1 = b --Get the CFrame of b relative to a. weld.C0 = a.CFrame:inverse() * b.CFrame --Return the reference to the weld so that you can change it later. return weld end
local weld = weldBetween(script.Parent.Part0, script.Parent.Part1) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 23 Aug 2015 02:09 PM |
umm both parts are unanchored, so the welded part would fall along with the part its being welded to..
while true do the do |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:11 PM |
| so how do I make it stay how it is? |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Aug 2015 02:18 PM |
What are you trying to do?
while true do the do |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:21 PM |
I'm making a destructible bridge most of it is just studs to inlets but I have to make a rotated part so I can't just connect it with studs |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:32 PM |
| nobody knows how to do this? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:34 PM |
I have no clue how to do this but I think you should weld all the parts together and then weld the "final" parts to the anchored parts of the bridge.
while true do the do |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:36 PM |
| the whole bridge is unanchored, and only like 4 parts need to be script welded |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:37 PM |
that makes no sense, arent the welded parts being connected to something?? something that is anchored/
while true do the do |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 02:37 PM |
| the only anchored thing is the baseplate |
|
|
| Report Abuse |
|
|
| |
|
| |
|