i mean i need to make this part look to the position on the mouse,
i got this script
active = 1
reload = 3
script.Parent.Activated:Connect(function()
if active == 1 then
active = 0
g = game.ReplicatedStorage.gosterblaster:Clone()
g.Parent = game.Workspace
g.PrimaryPart = g.Head
g:SetPrimaryPartCFrame(script.Parent.Parent["Torso"].CFrame * CFrame.new(7,2,2) * CFrame.Angles(0.29,math.rad(180),0))
wait(reload)
active = 1
end
end)
but i want this is rotate on my mouse
here a gif :
https://giphy.com/gifs/L2llMLfw0yMid0OYpb
so if anyone can help me thanks to him.

1 comment
You can start by reading up on Raycasting (https://developer.roblox.com/en-us/articles/Making-a-ray-casting-laser-gun-in-Roblox) and Mouse.Hit() (https://developer.roblox.com/en-us/api-reference/property/Mouse/Hit)