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

Why doesn't my welding in my user input function work?

Asked by 5 years ago
Edited 5 years ago

I have a weld script and whenever I play it always put bad cast in the output

Things you might want to know: 1.it's in a user input function 2.it has a problem on weld1.Part1 3. the variable biggears2 is a clone

Script:

local weld1 = Instance.new('Weld')
        weld1.Parent = biggears2
        weld1.Part0 = lup
        weld1.C0 = lup.CFrame:Inverse()
        weld1.Part1 = biggears2
        weld1.C1 = biggears2.CFrame:Inverse()

ask me any other questions I haven't put here.

0
Unrelated to this error, but set the weld Parent last. As for the "bad cast", can you copy-paste the exact error message? EmilyBendsSpace 1025 — 5y
0
What's biggears2 a clone of? I has to be a BasePart, it can't be something like a Model. EmilyBendsSpace 1025 — 5y
0
oh cause i weld it to a model paperking12 20 — 5y
0
here's the error message: 20:37:37.841 - bad cast 20:37:37.842 - Stack Begin 20:37:37.843 - Script 'Workspace.paperking12.LocalScript', Line 41 20:37:37.845 - Stack End paperking12 20 — 5y

Answer this question