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

what is wrong with this script?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
local w = Instance.new("Weld")
w.Part1 = Player.Character:FindFirstChild("Right Leg")
w.C0 = CFrame.new(-0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
w.C1 = CFrame.new()

1 answer

Log in to vote
1
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

Well, your weld doesn't have a Part0, so it isn't welding to anything. You also never parented it.

local w = Instance.new("Weld")
w.Part1 = Player.Character:FindFirstChild("Right Leg")
w.Part0 = -- Whatever you're trying to weld to the right leg.
w.C0 = CFrame.new(-0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0)
w.C1 = CFrame.new() -- Also not sure why this line is here.
w.Parent = -- Whatever you're trying to weld to the right leg

In the future, please be more descriptive with your titles and descriptions; you just pasted your script. Next time, explain what is happening (or not happening), and summarize it in the title, or your questions will probably be closed.

Ad

Answer this question