Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Wierd glich? (it's wierd for me if u know how to resolve it message me)

mouse = game.Players.LocalPlayer:GetMouse()
Pos = Vector3.new(mouse.Hit.p) 
clone:SetPrimaryPartCFrame(Pos)

error is

Unable to cast Vector3 to CoordinateFrame

1 answer

✓ Accepted answer

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))

3 comments

0

but i wanted to make it un rotateable so this is why i inserted these things

0

I've edited the code for needs

0

thanx

This discussion is preserved as it was. New answers, comments, and votes are closed.