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

How to make a tool to follow cursor movement

Asked by
Exsius 162
10 years ago

I want to make a object (tool) that will simply follow the cursor, also how could I make the camera follow the cursor?

Any help would be appreciated

Thanks,

Exsius,

1 answer

Log in to vote
4
Answered by 10 years ago

I believe this would work:

Supposing the tool is welded:

local Target = (Cam.CoordinateFrame * CFrame.new(0, 0, -100)).p
RightArmWeld.C1=((CFrame.new(User.Head.CFrame.p, Target) - User.Head.CFrame.p):inverse()) * (User.Head.CFrame - User.Head.Position)
0
thank you, I will try that out! Exsius 162 — 10y
Ad

Answer this question