the script
local cahr = game.Players.LocalPlayer.Character local mouse = game.Players.LocalPlayer:GetMouse() script.Parent.Activated:Connect(function() local x = Instance.new("Part",workspace) local bv = Instance.new("BodyVelocity",x) x.Size = Vector3.new(0.48, 0.14, 0.15) x.BrickColor = BrickColor.new("Bright yellow") x.Material = "Neon" x.Position = script.Parent.Handle.shot.Position x.Orientation = script.Parent.Handle.shot.Orientation.Y end) script.Parent.Deactivated:Connect(function() end)
I don't fully understand your question, but I think this fixes it:
local cahr = game.Players.LocalPlayer.Character local mouse = game.Players.LocalPlayer:GetMouse() local power = 100 --the power of the bullet script.Parent.Activated:Connect(function() local x = Instance.new("Part",workspace) local bv = Instance.new("BodyVelocity",x) x.Size = Vector3.new(0.48, 0.14, 0.15) x.BrickColor = BrickColor.new("Bright yellow") x.Material = "Neon" x.Position = script.Parent.Handle.shot.Position x.Orientation = Vector3.new(0,script.Parent.Handle.shot.Orientation.Y,0) bv.Velocity = x.LookVector * power end) script.Parent.Deactivated:Connect(function() end)
Do not use the second argument of Instance.new()
it is deprecated, and shouldn't be used.
Also you set the orientation which holds 3 values, to only one, the Y
value. Don't do that unless you will set only the Y axis.
local cahr = game.Players.LocalPlayer.Character local mouse = game.Players.LocalPlayer:GetMouse() local power = 100 --the power of the bullet script.Parent.Activated:Connect(function() local x = Instance.new("Part") x.Parent = workspace local bv = Instance.new("BodyVelocity") bv.Parent = x x.Size = Vector3.new(0.48, 0.14, 0.15) x.BrickColor = BrickColor.new("Bright yellow") x.Material = "Neon" x.Position = script.Parent.Handle.shot.Position x.Orientation = Vector3.new(0,script.Parent.Handle.shot.Orientation.Y,0) bv.Velocity = x.LookVector * power end) script.Parent.Deactivated:Connect(function() end)