The error I get is attempt to index local 'z'(a nil value). Can someone help please thx.
local z = Player:GetMouse()
local v = Instance.new("BodyVelocity", Player.Character.UpperTorso)
v.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
v.Velocity = z.hit.lookVector * 100

2 comments
Did you define what
Playerwas? https://wiki.roblox.com/index.php?title=API:Class/Player/GetMousedo "Player= game.Players.LocalPlayer" with local script otherwise it will not work