When I enter the test server for my game the part of the script where I get errors is at line 363,
RLWF:Destroy() LLWF:Destroy()
Once in game the server tells me the error and says "Destroy is not a valid member of CFrame" what way is there to fix this?
function DestroyLegWelds() RLC = New("Motor6D",chara.Torso,"Right Hip",{Part0 = chara.Torso,Part1 = chara["Right Leg"],C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),}) LLC = New("Motor6D",chara.Torso,"Left Hip",{Part0 = chara.Torso,Part1 = chara["Left Leg"],C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),}) RLWF:Destroy() LLWF:Destroy() end
RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
RLW.Part0 = chara["Right Leg"] RLW.C0 = RLWF LLW = Instance.new("Weld",chara["Left Leg"]) LLW.Part1 = HC.Parent LLW.Part0 = chara["Left Leg"] LLW.C0 = LLWF
You did not provide code to look at and specifically answer your question, but the problem you're having is this:
You are trying to delete the part's CFrame rather than the part itself.
local part = workspace:WaitForChild("Part") local partCFrame = part.CFrame -- you are deleting the cframe partCFrame:Destroy() -- INCORRECT -- but you should be deleting the actual part part:Destroy() -- CORRECT
The above script shows the general error you are making. RWLF
is a CFrame data type and you need to instead use :Destroy()
on whatever part it is the CFrame for.
Hope this helps :)