How to make mouse position

I made a fireball, but I was wondering how to make it go where the mouse position is. I JUST need the fireball to go the mouse position.
Thank you, and have a great day.

2 Likes

This detect the mouse cframe and position

3 Likes

Use Player:GetMouse().Hit, it will return a CFrame value of where the player’s mouse is.

I might be wrong though.
Here’s an simple example of how you would use it:

local part = Instance.new('Part')
part.Position = Vector3.new()
part.CanCollide = false
part.Anchored = true
part.Parent = workspace

local tool = script.Parent
local mouse = player:GetMouse()

tool.Activated:Connect(function()
local cFrame = mouse.Hit

if cFrame then
part.CFrame = cFrame
print('CFrame Position:', cFrame.Position)
else
print('Unable to find mouse position.')
end
end)
2 Likes