how would i make a Part fire towards the mouse with FE on?
local bv = Instance.new("BodyVelocity", CylinderMesh.Parent)
bv.velocity = CFrame.new(CylinderMesh.Parent.Position, Mouse.Hit.p).lookVector*85
bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
This is in a remote event in a server script
Mouse is defined in a local script that fires the remote event containing this code while passing Mouse which is a variable for Mouse = Player:GetMouse()
that only works in Studio because for some reason in online the Mouse is nil.
I already tried to pass Mouse as Mousey = Player:GetMouse() Mouse = Mousey.Hit and changed the code to
local bv = Instance.new("BodyVelocity", CylinderMesh.Parent)
bv.velocity = CFrame.new(CylinderMesh.Parent.Position, Mouse.p).lookVector*85
bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
but When I change it to this it doesnt work properly in both studio and online. Halp plz

1 comment