Jump to content

help in changing a colshape's size


Me[Z]oO

Recommended Posts

Posted (edited)

Because the element is already created. You'll have destroy and then create it in your function called by the timer.

Edited by NeXuS™

6C73yFv.png

Did I help you?

Mmpe7Jm.gif


NeXuS™#0001

Posted (edited)
local radius = 520
local MySphere = createColSphere(0, 0, 3, radius)
function changeSize()
	radius = radius - 10
	destroyElement(MySphere)
	MySphere = createColSphere(0, 0, 3, radius)
end
setTimer(changeSize, 1000, 0)

 

Edited by NeXuS™
  • Thanks 1

6C73yFv.png

Did I help you?

Mmpe7Jm.gif


NeXuS™#0001

  • Moderators
Posted

If you do this every second, yes. (little network lagg, which will be visible by players with slow internet)

But every 2 minutes will be fine.

 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted

Shouldn't be notice able. (unless really really really :~ty internet)

 

  • Like 2

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...