mouse = game.Players.LocalPlayer:GetMouse() Pos = Vector3.new(mouse.Hit.p) clone:SetPrimaryPartCFrame(Pos)
error is
Unable to cast Vector3 to CoordinateFrame
Line 2's problem: Why are you constructing a Vector3 with a Vector3? Also, this isn't needed
Line 3's problem: SetPrimaryPartCFrame
needs a CFrame, yet you passed a Vector3. However, mouse.Hit
is a CFrame, mouse.Hit.p
is a Vector3.
local mouse = game.Players.LocalPlayer local pos = mouse.Hit clone:SetPrimaryPartCFrame(CFrame.new(pos.Position))