So i have 2 Questions 1. How do i make my Cylinder go wherever i point? Aka Laser 2. My Laser is Firing! but not from in front of me! help please!
My script:
Player = script.Parent.Parent mouse = Player:GetMouse() function onKeyDown(key) Key = key:lower() if key == "z" then x = Instance.new("Part") x.BrickColor = BrickColor.new("Really red") x.Size = Vector3.new(5, 5, 5) x.TopSurface = "Smooth" x.BottomSurface = "Smooth" x.Shape = "Cylinder" x.Transparency = 0.7 y = Instance.new("BodyVelocity") y.maxForce = Vector3.new(math.huge, math.huge, math.huge) y.velocity = Player.Character.Torso.CFrame.lookVector*80 x.Parent = Workspace y.Parent = x f = Instance.new("Sparkles", x) f.Size = 7 f.Heat = 0 x.CFrame = Player.Character.Torso.CFrame *CFrame.new(0, 0, -12) game.Debris:AddItem(x, 6) end end mouse.KeyDown:connect(onKeyDown)