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:
nuke = script.Parent pos = nuke.CFrame while wait() do nuke.Size = nuke.Size + Vector3.new(.1,.1,.1) nuke.CFrame = pos nuke.speed = 100 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
local Part = script.Parent local TweenInformation = TweenInfo.new( 5, --length of tween Enum.EasingStyle.Back, -- Type of tweening style Enum.EasingDirection.In, --Direction of tween, whether it goes in, or our, or both! 0, -- how many times it should repeat! (set to a negative value if you want it to go on forever) false, --If it will reverse when finished 0) --Delay between tweens local PartProperty = { Size = Vector3.new(100,100,100); -- size of resulting part } local TweenAnimLegit = TweenService:Create(Part,TweenInformation,PartProperty) TweenAnimLegit:Play()
Happy c0ding B)