The cylinder resizes on the back and front. I only want it to resize on the front.
LaunchRemote.OnServerEvent:Connect(function(player, Cooldown) local character = player.Character or player.CharacterAdded:wait() if character then character.HumanoidRootPart.Anchored = false end if charge then charge.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(0, 1, -2) end local TweenInform = TweenInfo.new( 1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) local properties = { Size = Vector3.new(4, 4, 4) } local Tween = TweenService:Create(charge, TweenInform, properties) Tween:Play() if charge then charge.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(0, 1, -2.5) end local launch = Instance.new("Part") launch.BrickColor = BrickColor.new("Cyan") launch.Anchored = true launch.CanCollide = false launch.Shape = "Cylinder" launch.Orientation = Vector3.new(0, 90, 90) launch.Material = "Neon" launch.Size = Vector3.new(1, 15, 15) launch.Parent = charge launch.CFrame = charge.CFrame * CFrame.Angles(0, math.rad(90), 0) --launch.CFrame = CFrame.Angles(0, math.rad(90), 0) local TweenInform2 = TweenInfo.new( 0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) local properties2 = { Size = Vector3.new(60, 15, 15) } local Tween2 = TweenService:Create(launch, TweenInform2, properties2) Tween2:Play() launch.CFrame = charge.CFrame * CFrame.Angles(0, math.rad(90), 0) launch.Position = launch.Position + Vector3.new(launch.Size / 2, 0, 0) end)
local increase = Vector3.new(1,0,0) script.Parent.Position = script.Parent.Position+ increase/2 -- /2 is divide by two, make it a minus number if you want it to extend backwards script.Parent.Size = script.Parent.Size + increase