function game.ReplicatedStorage.MV.M1.Fire:OnServerInvoke(player)
local b3 = Instance.new("Part")
b3.Shape = "Cylinder"
b3.Material = "Metal"
b3.Transparency = 0.5
b3.Size = Vector3.new(1,4,4)
b3.Anchored = true
b3.CanCollide = false
b3.BrickColor = BrickColor.new("Really red")
b3.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new(0,1,-2) *CFrame.Angles(0,51.8,0)
b3.Parent = game.Workspace

for i = 1,25 do
	wait(0.01)
	b3.Size = b3.Size + Vector3.new(1,0,0)
	b3.CFrame = b3.CFrame - Vector3.new(0,0,1)
end
wait(1)
b3:Destroy()
end

Basically the issue is it goes to the wrong direction as it gets longer, anyway I can fix this?

7 comments

0

I'm guessing because on line 16 you're moving it one stud in the Z direction. To get it to go the other way, just do -1 instead of 1.

0

Which direction do you want it to move? Have you tried changing the added vector values?

0

Forward, is which way im trying to move it.

0

Also I put - Vector3.new(0,0,1) Wouldn't that be the same thing as -1?

0

can you show the server script please

0

also you need to tab all your lines of code. when you make something like a function or a if statement for example, you need to indent everything in there

0

Uh I am face planting at you rn, this is the server script, you would be able to tell this if you read it correctly. Next, indenting is not needed.