Basically making something appear to get bigger.
How do i change the size of a part over time?
3 answers
You need to write a better question as commented on above, however, I can help you start.
using time() you can get the time in seconds of how long a server has been running for, you can also set variable to time, and get the difference of time as explained below.
time1 = time()
wait(5)
time2 = time()
print(math.floor(time2-time1)) -- should print 5, math.floor rounds it down so that you dont get any of the slightest excessive time if there is any
--Now here is your job, use the time function as explained above(you may not need to find the --difference) to make the brick grow, remember the brick size is Vector3
--[[LINKS:
http://wiki.roblox.com/index.php?title=Function_dump/Functions_specific_to_ROBLOX&redirect=no#tick.28.29
http://wiki.roblox.com/index.php?title=API:Class/Part#tick.28.29
]]
As the others said, this is not a request site. Due to the simplicity of the problem, I will help you out.
while wait(5) do --Every 5 seconds, the code below will run. This is essential to making something happen over time. (Change the 5 to whatever amount of seconds you want to wait)
workspace.Part.Size = workspace.Part.Size + Vector3.new(3,3,3) --Every 5 seconds, it will add 3 studs to each side. (Change to your needs)
print("Made larger!") --When the code is finished, it will print 'Made larger!' (You can remove this if you want)
end
1 comment
Yo that doesn't help him, doesn't matter how easy the problem may be, he should figure it out by himself
Well first off we'd probably all like a script that we could build off on. Anyways I guess I'll give it a go. So let's say you have a Part and the part has the following properties: FormFactor = custom, Anchored = true. If you do, let's go on to the next script. The easiest way of doing this is to porpotionally increase the Size of the part in the x, y, and z directions using a repeat loop. This type of loop would look like this:
repeat
--do stuff
until --condition
Now if you don't know what the until part of the script is already, it basically stops the loop when based on certain conditions (In Other Words if a property of a value such as a variable is true or false, it will stop the loop). Then, we'd have to add to the size of that part every time the loop was ran. So we'd create a holding variable, and add to it every time the loop is ran. It would then look something like this:
HoldingVariable = 0
repeat
HoldingVariable = HoldingVariable + 1
until --condition
You'd also have to create the variable before the loop. You can also add whatever value you want to the HoldingVariable every time the loop is ran. Finally the last step is to actually create a code that would change the size of the part. Assuming your using a part that is named "Part", you'd first have to grab that part from the game. To do this, we would first find the workspace, using game.Workspace . Then we would find the part from the Workspace. So we would say: game.Workspace.Part Finally the last step is to set the Size of that part. NOTE that setting size's requires Vector3 values. Basically, these hold 3 numbers that specify the x, y, and z direction for an object. The final product would look like this:
HoldingVariable = 0
repeat
wait(.01)
HoldingVariable = HoldVariable + .01
game.Workspace.Part.Size = Vector3.new(HoldingVariable,HoldingVariable,HoldingVariable)
until HoldVariable == 100
Of coarse I've added a wait time to it, so that we control how many times we loop the code around every second. You can also add something to the until line of the loop to stop the loop when a size max. is reached. I preset it to 100 just to make it easy on you :0.
I hope this answer helped with your script. If you have any questions, please put a comment below. If you have any further questions, I have some other links below to the wiki. YOUR WELCOME!!!
LINKS:
Roblox Wiki: http://wiki.roblox.com/index.php/Scripting
"Your first script" Article: http://wiki.roblox.com/index.php?title=In-Depth_Scripting_Guide
Variables: http://wiki.roblox.com/index.php?title=Variable
Loops: http://wiki.roblox.com/index.php?title=Loops
Vecor3 Values: http://wiki.roblox.com/index.php?title=Vector3
The "Part" object: http://wiki.roblox.com/index.php?title=API:Class/Part
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
What have you tried, and what is wrong in your code. Write a question properly.
You need to supply an attempt. This is not a request site.