For some reason, the blast doesn't follow the position of the mouse. It goes in diffrent locations based on the player's rotation.
RC.OnServerInvoke = function(player,empty,hum,car,pli,play,mouse) hum.WalkSpeed = 0 wait() empty = false local block = Instance.new("Animation") block.AnimationId = blockid local BlockTrack = hum:LoadAnimation(block) BlockTrack:Play() wait(0.5) local blast = Instance.new("Part") blast.Parent = game.Workspace blast.CanCollide = false blast.BrickColor = BrickColor.new("White") blast.Material = Enum.Material.Neon blast.Size = Vector3.new(4,4,30) blast.CFrame = car.HumanoidRootPart.CFrame * CFrame.new(0,0,5) local body = Instance.new("BodyForce") body.Force = play body.Parent = blast wait(1) block:Destroy() hum.WalkSpeed = 16 empty = true end
```local mouse = pli:GetMouse() local play = mouse.Hit.lookVector * 100```
Evidence:
https://streamable.com/5gzr4r
Any suggestions/ solutions ?
I finally managed to solve it by adding the mouse.Hit feature inside the InputBegan function and it worked. Thanks to everyone that helped.