local debris = game:GetService("Debris")
--This is the Server Script
local function shootbullet(origin,direction,ting)
local part = Instance.new("Part")
part.Parent = game.Workspace.Laseronias
part.Material = Enum.Material.Plastic
part.BrickColor = BrickColor.new("Gold")
part.Size = Vector3.new(0.1,0.1,0.1)
part.Anchored = true
part.CanCollide = false
part.Position = origin.Position
for i = 0,1,0.1 do
wait()
part.Position:Lerp(ting,i)
print("moved")
print(ting)
end
end
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player,jP,oP)
local DEST = (jP-oP.Position).Unit * 999
local tikn = (jP-oP.Position)
local Res = workspace:Raycast(oP.Position,DEST)
local resPart = Res.Instance
if Res then
print(Res.Instance.Name)
if resPart.Parent:FindFirstChild("Humanoid") and resPart.Parent:FindFirstChild("Humanoid") ~= player.Character:FindFirstChild("Humanoid") then
resPart.Parent:FindFirstChild("Humanoid"):TakeDamage(100)
end
end
shootbullet(oP,DEST,tikn)
end)
--This is the Localscript
local Jerry = game.Players.LocalPlayer:GetMouse()
local tool = script.Parent
local origin = script.Parent.meGun.Origins
local debounce = false
local cooldown = 0.2
Jerry.TargetFilter = game.Workspace.Laseronias
Jerry.TargetFilter = origin
script.Parent.Activated:Connect(function()
if debounce then return end
debounce = true
local jerryPos = Jerry.hit.p
local oPos = origin
game.ReplicatedStorage.RemoteEvent:FireServer(jerryPos,oPos)
wait(cooldown)
debounce = false
end)
So it prints my correct position of the mouse and "moved" but it just doesnt move and stays at the origin position how i fix it ? !

2 comments
So, it kind of worked (it moves) but it doesnt always go where the mouse is.
That part is controlled in the local script, but its not the point of your question, and I really have no clue what is wrong