Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a nuke explosion grow faster?

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.

2 comments

0

Do you realize that you have nuke.CFrame = nuke.CFrame ?

0

And speed is no property of a Part. Just change how much it grows from .1 to like .2 or something, It won't look as smooth but it will grow faster

1 answer

✓ Accepted answer

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)

3 comments

1

I don't think it's possible to wait less than 0.03

0

Ah my bad

0

yep, I checked at it's capped at 1/30th (so the default wait())

This discussion is preserved as it was. New answers, comments, and votes are closed.