I'm currently getting a problem in my script where a BodyVelocity gets a direction and everything and it works fine when no in a server. But in a server it doesn't work. The error is apparently on the line where i determine the direction a blast should go. This code is inside a server script.
Script:
local BV = Instance.new("BodyVelocity")
BV.Parent = Blast
BV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
local direction = -(Blast.Position - player:GetMouse().Hit.p)
BV.Velocity = direction.unit * 80
Any help?

6 comments
does unit exists?
.unit is a vector3 thing, that line is perfectly valid, possibly
Blastis nil, try using print to see what all your variables are, one of them must be nil, and then you can do further debugging from there.I think the variable blast is nil
Which line is line 21
line 21 is local direction
@theCJarmy7 I thought that Blast may be nil as well so I went and did player.Character.Blast.Position instead and it still didn't work.