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

How do I get the 'Position' of where I'm clicking at, so I can shoot the bullet there?

Asked by
naturedat 124
4 years ago

Hi, this is the first time I'm using this website. I'm trying to make a magic staff that shoots magic. I've understand how to use CFrame.new and Vector3.new but I don't know how to make the 'bullets' move to the point (Position) where I clicked my mouse at. I have seen some videos about using Mouse.Hit to get the position but I don't understand the GetMouse and there is something with the website. Help please! https://developer.roblox.com/en-us/api-reference/property/Mouse/Hit

*Sorry if there is any grammar mistake, English is my second language.

0
GetMouse() is just to get the player's mouse, so it can be used later. I don't think you can just immediately do "player.Mouse" . Don't worry about it. Just get the mouse by doing "local mouse = player:GetMouse()" AntiWorldliness 868 — 4y
0
So will it work if I put this into my script?: script.Parent.bullet.BodyPosition.Position = Vector3.new (mouse.Position) naturedat 124 — 4y

Answer this question