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

Why can't I just weld parts using my script?

Asked by
noposts 75
6 years ago

I've been trying to solve this problem for almost an hour and it just doesn't seem to work for me. I also have read the wiki and I'm pretty sure I understand how welding, C0, and stuff like that works now, but when I apply it, it doesn't work. Even copy pasting the script itself from the wiki didn't work and exactly copying code from a video didn't work.

Here's my script in its simplest form:

part0 = workspace:WaitForChild('part0')
part1 = workspace:WaitForChild('part1')

local weld = Instance.new("Weld", part0)
weld.C0 = part0.CFrame:inverse() * part1.CFrame

Yes, I'm very sure that there are parts named part0 and part1 in the workspace and no errors relevant to the script outputs.

1 answer

Log in to vote
0
Answered by
evaera 8028 Trusted Badge of Merit Snack Break Game Jam Winner Moderation Voter Administrator Community Moderator Super Administrator
6 years ago

You didn't set the properties Part0 or Part1 of Weld. You need to set those for a weld to work.

0
oh man what a reckless mistake thanks noposts 75 — 6y
Ad

Answer this question