Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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.

01LaunchRemote.OnServerEvent:Connect(function(player, Cooldown)
02    local character = player.Character or player.CharacterAdded:wait()
03 
04    if character then
05        character.HumanoidRootPart.Anchored = false
06    end
07 
08    if charge then
09        charge.CFrame = character.HumanoidRootPart.CFrame * CFrame.new(0, 1, -2)
10    end
11 
12    local TweenInform = TweenInfo.new(
13        1,
14        Enum.EasingStyle.Linear,
15        Enum.EasingDirection.Out,
View all 61 lines...
0
offset the position by half the size EpicMetatableMoment 1444 — 6y
0
how do I offset the position? n0body4 2 — 6y
0
Add to the current position by a vector EpicMetatableMoment 1444 — 6y
0
Sorry, I still don't understand how to do that n0body4 2 — 6y
View all comments (2 more)
0
part.Position = part.Position + Vector3.new(0, part.Size / 2, 0) -- pick ur axis GoldAngelInDisguise 297 — 6y
0
Thank you, but it still resizes on the back and front of the cylinder n0body4 2 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago
1local increase = Vector3.new(1,0,0)
2script.Parent.Position = script.Parent.Position+ increase/2 -- /2 is divide by two, make it a minus number if you want it to extend backwards
3script.Parent.Size = script.Parent.Size + increase
Ad

Answer this question