mouse = game.Players.LocalPlayer:GetMouse()
Pos = Vector3.new(mouse.Hit.p)
clone:SetPrimaryPartCFrame(Pos)
error is
Unable to cast Vector3 to CoordinateFrame
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))
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
but i wanted to make it un rotateable so this is why i inserted these things
I've edited the code for needs
thanx