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

Trying to figure out mouse tracking, help?

Asked by
hudzell 238 Moderation Voter
10 years ago

I am having trouble thinking of how to add mouse tracking to my guns (gun moves up and down with your mouse), but I can't seem to figure it out. Free model scripts don't work and google doesn't help. Can any of you help?

0
Show what you already tried? Perci1 4988 — 10y
0
I didn't try, because I have absolutely no clue how to do it hudzell 238 — 10y

1 answer

Log in to vote
0
Answered by
MrFlimsy 345 Moderation Voter
10 years ago

The Camera object has a Focus property that shows/dictates where the camera is aiming. Likewise, the second portion of a CFrame value will set the rotation of an object. This is not a request website, and so I can't write you a full script, but this knowledge should point you in the right direction. Here are some helpful links:

http://wiki.roblox.com/index.php?title=CFrame

http://wiki.roblox.com/index.php?title=API:Class/Camera

Ad

Answer this question