I made a button that moves a model when it is clicked. The script is eternally simple and I can't understand why it isn't working.
I get the error Unable to cast double to CoordinateFrame
Here is the script:
script.Parent.ClickDetector.MouseClick:connect(function() script.Parent.Parent:SetPrimaryPartCFrame(10,0,10) end)
Help please.
You made a simple mistake. You tossed in 10,0,10 but you need it to be CFrame.new(10,0,10).
SetPrimaryPartCFrame
needs two things. First you MUST have a PrimaryPart for the model before you try to use SetPrimaryPartCFrame
and also, in the parenthesis, you need a CFrame value!