Uperscuzzi
Uperscuzzi

Reputation: 19

How to make a simple pointTowards() function in Roblox lua

Specifically, I want to make a part point towards the players x, y, and z coordinates. Is there a math equation that I can use? Or maybe something along those lines?? Thank you

Upvotes: 1

Views: 976

Answers (1)

trico
trico

Reputation: 111

Try using:

YourPart.CFrame = CFrame.lookAt(YourPart.Position, Player.Position)

Upvotes: 1

Related Questions