(https://i.gyazo.com/91b904dcffcb39f182503de170d94ec3.mp4)
When shooting the gun, the bullet does not look where my mouse is pointing.
The bullet has a BodyVelocity that accelerates in it’s lookvector.
-- local script
local mouse = game.Players.LocalPlayer:GetMouse()
firing = false
mouse.Button1Down:Connect(function()
firing = true
end)
mouse.Button1Up:Connect(function()
firing = false
end)
script.Parent.Activated:Connect(function()
repeat wait(.11)
script.Parent.RemoteEvent:FireServer(mouse.Hit.Position)
until not firing
end)
--normal script
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr, destination)
local bullet = game:GetService("ServerStorage").Bullet:Clone()
bullet.Parent = game.Workspace
bullet.Position = script.Parent.Handle.Position
bullet.CFrame = CFrame.lookAt(bullet.Position,destination)
script.Parent.Handle.Fire:Play()
script.Parent.Handle.Light.Enabled = true
wait(.1)
script.Parent.Handle.Light.Enabled = false
end)
Any ideas on why this is occurring? Thanks