I have made a script that makes a death block grow I am trying to make it that the speed of it growing is really fast so it simulates a real nuclear explosion.
Here is the script I made:
1 | nuke = script.Parent |
2 | pos = nuke.CFrame |
3 |
4 | while wait() do |
5 | nuke.Size = nuke.Size + Vector 3. new(. 1 ,. 1 ,. 1 ) |
6 | nuke.CFrame = pos |
7 | nuke.speed = 100 |
8 | end |
When I add in the speed part the entire script does not work.
the default wait() is capped at around 0.03, so you can't make the wait() quicker there. To add speed
isn't a property! However, I suggest using tweening! Tweening in essence is manipulating a part, while making it smooth!
https://developer.roblox.com/en-us/api-reference/function/TweenService/Create
Here's some sample c0de I wrote
01 | local Part = script.Parent |
02 |
03 | local TweenInformation = TweenInfo.new( |
04 | 5 , --length of tween |
05 | Enum.EasingStyle.Back, -- Type of tweening style |
06 | Enum.EasingDirection.In, --Direction of tween, whether it goes in, or our, or both! |
07 | 0 , -- how many times it should repeat! (set to a negative value if you want it to go on forever) |
08 | false , --If it will reverse when finished |
09 | 0 ) --Delay between tweens |
10 |
11 | local PartProperty = { |
12 | Size = Vector 3. new( 100 , 100 , 100 ); -- size of resulting part |
13 | } |
14 |
15 | local TweenAnimLegit = TweenService:Create(Part,TweenInformation,PartProperty) |
16 | TweenAnimLegit:Play() |
Happy c0ding B)