I am attempting to create a snowball that you can launch in the directions of your mouse. This is probably very simple to do, however I am having trouble seeing how I would do it. I’ve been able to create a laser gun using raycasting, but I need to know how to launch a part in the direction of the mouse. Any help is appreciated!
I don’t know how reliable this model is because it was updated a year ago, but perhaps it could serve as a guide for what you may need. That is, if you’re looking to create a snowball with similar functionality.
Snowball.CFrame = CFrame.new(Player.Character['Location'].Position + Vector3.new(0,0,2),Mouse.Hit.p)
Snowball.Velocity = Snowball.CFrame.LookVector * 225
local BF = Instance.new("BodyForce", Snowball)
BF.Force = Vector3.new(0,(Snowball:GetMass() - Snowball:GetMass()*.0 )* workspace.Gravity)
This is a concept i used for bullets and you’d have to make it compatible with filtering enable as thats just the concept also the “*.0” is like a drop so if you want it to drop 10% from the mouse position just put .1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.