You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to make it so that the dodgeball is launched in the direction of the players mouse cursor, currently it just launches in the positive X direction -
What is the issue? Include screenshots / videos if possible!
I cant get the dodgeballs VectorForce to correspond with the the direction of the players mouse
properties of the VectorForce if its helpful at diagnosing the issue at all:
Script is located in StarterCharacterScripts
local Character = script.Parent
local Dodgeball = game.ReplicatedStorage.Dodgeball
Mouse.Button1Down:Connect(function()
local DodgeballClone = Dodgeball:Clone()
DodgeballClone.Position = Character["Left Arm"].LeftGripAttachment.WorldPosition -- makes starting position characters left arm
DodgeballClone.Parent = game.Workspace
local DirectionRay = Camera:ScreenPointToRay(Mouse.X, Mouse.Y).Direction
DodgeballClone.VectorForce.Force = (DirectionRay * 200) -- changes force to DirectionRay output * 200
end)