Hi! I made a gun and it only fires when I'm standing near 0,0,0.
player = game.Players.LocalPlayer
mouse = player:GetMouse()
function fire()
local part = Instance.new("Part",player.Character)
part.Size = Vector3.new(2,2,2)
part.CFrame = CFrame.new(player.Character.Torso.CFrame.p,mouse.Hit.p)
part.CanCollide = false
part.Anchored = false
local vel = Instance.new("BodyVelocity",part)
vel.Velocity = part.CFrame.lookVector*100
game.Debris:AddItem(part,3)
end
Whenever I use fire(), it'll only work if I am near 0,0,0. If I'm, say at 5,0,0, it won't work. The parts will just hang in the air.

1 comment
That's new, thank you!