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

Why does this increase part size code crash roblox studio?

1 answer

✓ Accepted answer

There is A Much Better Way To Do This, Roblox Has These Services Called "Tween Service" And What They Do is, They Tween The Objects That You Want To Transform/Move Here I'll Write The Code And Make It Easier For You.. Note:Make sure this script is in "increase size button" or it wont work. Script:

local dong = game.Workspace.dong
           local tweenservice = game:GetService("TweenService")-- get the tweenservice first
local info = TweenInfo.new(
  4,-- the duration of "dong" Size Changing  
  Enum.EasingStyle.Sine, --The Style You Want To Make dong Change in
  Enum.EasingDirection.Out,-- The Direction Which Should Be "Out" In Your case
  0,--these arent really relevant to your Case
  false,--
  0--------------------------------------------------)
  )
local goals = {--now we're gonna tell the script How Big/Small We Want "dong" To Be
Size = Vector3.new(dong.Size.X,20,dong.Size.Z)--you can replace the 20 with how high you want "dong" to be after The Tranformation!

} 
local tween = tweenservice:Create(dong,info,goals)--now lets create the whole tween with everything we have written!
script.Parent.Touched:Connect(function()-- now for the most important part!!!
	tween:Play()
	
	
end)

If you Have Anymore Questions Then Im Happy T Answer :)

8 comments

0

Thanks for the reply, but do you know why my script is freezing studio by any chance, and/or why it isn't increasing the size properly?

0

Nope Sadly My Studio Didnt Lag When That Error Was OutPuted, So I Don't Really Know Much Soz :(

0

Its Probably Because Executing A Script like That Would Possibly Crash R.S or Maybe Your PC Is Weak tbh idk.

0

Besides I Think Its Much More Smoother To use The Tween Service

0

Ah ok... did the script work for you, like did it increase the size as it should have done?

0

Yes And In A Smooth Way Too!

0

Ah nice! Did my bad script work though?

0

I Dont know did it? you said it crashed roblox studio.

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