Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

new is not a valid member?

Asked by
KAAK82 16
10 years ago
p.CFrame = p.CFrame.new(Vector3.new(pos, focus))

is the line...

1 answer

Log in to vote
3
Answered by
Ekkoh 635 Moderation Voter
10 years ago

Assuming pos and focus are both Vector3 values, this will reposition p to pos and make it face focus

p.CFrame = CFrame.new(pos, focus)

If they're parts,

p.CFrame = CFrame.new(pos.Position, focus.Position)
0
pos and focus are Parts, sry I didnt mention it KAAK82 16 — 10y
0
lol I had tried this same line it didnt work, but I anchored the focus part and strange stuff started to happen... so I decided to try this now, thnx :D KAAK82 16 — 10y
0
Just add .Position if they're parts :) Ekkoh 635 — 10y
Ad

Answer this question