here is the script:
local i = Instance.new("ManualWeld", game.Workspace.Instanc) i.Name = "weld" i.Part0 = i i.Part1 = game.Workspace.Instanc
"Bad cast" is an unspecific error message that tells you that you used the wrong kind of thing somewhere1
You should write your code on multiple lines, and it would tell you the problem is
i.Part0 = i
This isn't valid. i
is a ManualWeld, but Part0
needs to be a Part.
"Bad cast" comes from C++, where it means you tried to turn one thing into another, but couldn't ↩
I see that BlueTaslem Already answered this, but i decided to give my solution to you problem anyways. Hope this helps somehow.
Part0 = game.Workspace.Instanc.Part0 Part1 = game.Workspace.Instanc.Part1 local i = Instance.new("ManualWeld", Part0) i.Name = "weld" wait() i.Part0 = Part1 i.Part1 = Part0