How to resize a part from one face using a script, animated in roblox studio
How to resize a part from one face using a script, animated in roblox studio this tutorial of 30 minutes will teach you, how to scale a part from one face like in studio, animated and detailed!
On the way to achieve that, You'll learn:
- How to manipulate the properties position and size.
- How to use and manipulate Vector3's and Enum.NormalId (Faces) and Enum.Axis (Vector3.FromAxis)
- How to tween a part's position and size.
- How to manipulate enums and use them to your own advantage (names, values)
- How to use the documentation to fix your code
We'll create the following functions that you can reuse in your projects: function GetAxisFromFace(face) -- Enum.NormalId function ScaleFaceTween(instance, face, deltaSize, tweenInfo) -- if deltaSize negative, it will shrink the part instead! function GetEnumFromValue(enum, value)
I'm aware that this function exists in roblox, but am gonna show you the logic behind it And also you can't use this function to animate normally (TweenService) function Resize ( NormalId normalId , int deltaAmount )
Download the part with the script here: https://www.roblox.com/library/7657759415/
Discord server (Get early access to video resources): https://discord.gg/mxqM4hf
Buy me a coffee: https://www.paypal.com/paypalme/CodesOtakuYT
Download my popular cutscene plugin: https://www.roblox.com/library/4897560482/Codes-Otaku-Cutscene
▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬ 00:00 Explaining and understanding how to solve the problem 05:30 Scripting: Tween a part size in both direction as a start 10:40 Testing: resizing a part in both directions 11:24 Explaining: The next step 12:10 Scripting: Tween a part size from one face 14:40 Testing: Tween a part size from one face 15:00 Explaining: The issue with our current script 16:10 Scripting: Breaking down our problem into smaller problems (Functions) 22:50 Scripting: Using our handmade function 23:30 Bugs: Fixing some minor bugs 24:00 Testing: Scaling one face without problems 24:24 Scripting: Animating the other faces too! 25:35 Testing: The masterpiece animating cube :D 26:27 Gibberish: Skip this part :/ 27:38 Explaining: Looking up roblox documentation about Enums! 28:12 Scripting: Let's rewrite the masterpiece cube in 1 loop instead of 12 lines using enum magic 29:00 Bugs: Using roblox documentation to learn about enums 31:40 Scripting: Breaking down the problem into it's own function 32:40 Bugs: 33:40 Scripting: The underrated golden function GetEnumItems() 34:04 Testing: The masterpiece in all of it's glory 34:15 Outro: Leave a like and subscribe so I push more quality videos ^_^
▬ EXTRA ▬▬▬▬▬▬▬▬▬▬ Roblox Studio:
Roblox allows players to create their own games using its proprietary engine, Roblox Studio, which can then be p ... https://www.youtube.com/watch?v=Gs6FphKCgks
199862302 Bytes