Hello, my name is nachsor(aka skelyvelocirap). I am in the progress of making a game on Roblox, it is fairly close to being playable but I did encounter a problem :|. I am trying to move a model to the position my mouse is at but I need to use CFrame. There is this MoveTo() Function which I have an issue with. When I try feeding it a Frame value:
mtarget:MoveTo(CFrame.new(posX, 0, posZ))
it just shows me an error: 14:17:23.212 - Unable to cast CoordinateFrame to Vector3
This error is fairly annoying as I really want to use CFrame for it as my game is a sandbox Tycoon (not the name) and I want the placement system to place the models at a specific hight but go through blocks if needed.
Is there a way to use Frame instead of the Vector3?
thank you -nachsor

4 comments
There's a function called SetPrimaryPartCFrame that uses a CFrame
I did use it but you can only add, subtract or multiply the value, not set the value to a specific amount.
wdym
oh never mind, I probably used it in conjunction with something that made it do something weird. Thank you very much, it works very good with this: mtarget:SetPrimaryPartCFrame(CFrame.new(posX, 0, posZ))