CoderFunda

Pages

▼

01 December, 2023

How to resize a cylinder from one end and move it backwards in Roblox

I'm making a cigarette in Roblox and I want it to work correctly


it made the cig resize to the front.


you can get it yourself here:

https://filetransfer.io/data-package/qKBHvHxS#link />

and for people who want the code all you really need to see is this:
for i = bit.Size.X, 0, -0.1 do
local tweenInfo = TweenInfo.new(0.1)
local goal = {}
goal.Size = Vector3.new(i, bit.Size.Y, bit.Size.Z)
local tween = TweenService:Create(bit, tweenInfo, goal)
tween:Play()
wait(0.1)
bit.CFrame = bit.CFrame + bit.CFrame.LookVector * -0.1
end



But seriously, I do recommend downloading the RBXM file and actually testing it.


Also its a tool, so this accounts for rotations.
Programing Coderfunda at December 01, 2023
Share

No comments:

Post a Comment

Thanks

‹
›
Home
View web version
Powered by Blogger.