here is the script:
local i = Instance.new("ManualWeld", game.Workspace.Instanc) i.Name = "weld" i.Part0 = i i.Part1 = game.Workspace.Instanc
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 somewhere[^1]
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.
[^1]: "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
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
thank you!!