How do I resize a part one way?
Asked by
6 years ago Edited 6 years ago
The cylinder resizes on the back and front. I only want it to resize on the front.
01 | LaunchRemote.OnServerEvent:Connect( function (player, Cooldown) |
02 | local character = player.Character or player.CharacterAdded:wait() |
05 | character.HumanoidRootPart.Anchored = false |
09 | charge.CFrame = character.HumanoidRootPart.CFrame * CFrame.new( 0 , 1 , - 2 ) |
12 | local TweenInform = TweenInfo.new( |
14 | Enum.EasingStyle.Linear, |
15 | Enum.EasingDirection.Out, |
22 | Size = Vector 3. new( 4 , 4 , 4 ) |
25 | local Tween = TweenService:Create(charge, TweenInform, properties) |
28 | charge.CFrame = character.HumanoidRootPart.CFrame * CFrame.new( 0 , 1 , - 2.5 ) |
31 | local launch = Instance.new( "Part" ) |
32 | launch.BrickColor = BrickColor.new( "Cyan" ) |
33 | launch.Anchored = true |
34 | launch.CanCollide = false |
35 | launch.Shape = "Cylinder" |
36 | launch.Orientation = Vector 3. new( 0 , 90 , 90 ) |
37 | launch.Material = "Neon" |
38 | launch.Size = Vector 3. new( 1 , 15 , 15 ) |
39 | launch.Parent = charge |
41 | launch.CFrame = charge.CFrame * CFrame.Angles( 0 , math.rad( 90 ), 0 ) |
44 | local TweenInform 2 = TweenInfo.new( |
46 | Enum.EasingStyle.Linear, |
47 | Enum.EasingDirection.Out, |
54 | Size = Vector 3. new( 60 , 15 , 15 ) |
57 | local Tween 2 = TweenService:Create(launch, TweenInform 2 , properties 2 ) |
59 | launch.CFrame = charge.CFrame * CFrame.Angles( 0 , math.rad( 90 ), 0 ) |
60 | launch.Position = launch.Position + Vector 3. new(launch.Size / 2 , 0 , 0 ) |