Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

New at scripting - how to change mesh scale?

Asked by 9 years ago

I've been doing this, but obviously it doesn't work and I don't know how to fix it. wait(0.1) circle.Mesh.Scale = (0.6,1,0.6) wait(0.1) circle.Mesh.Scale = (0.75,1,0.75) wait(0.1) circle.Mesh.Scale = (1,1,1) wait(0.1) circle.Mesh.Scale = (1.4,1,1.4) wait(0.1) circle.Mesh.Scale = (2,1,2)

is there some kind of = scale.new or something? Please help!

1 answer

Log in to vote
1
Answered by 9 years ago

First off, when you put any scripts n this site, use the "Code Block" to make it easier to view your code (Press the iconthat says Lua above where you type your question, and type your code in between the two lines that pop up)

As for your code, meshes use something called a Vector3 value when changing the size and whatnot. Vector3 is common in changing the size and position of bricks. More on Vector3

Also you need to either set a variable for what "circle" is, or find it in your script by using

game.Workspace.circle.Mesh.Scale -- ...etc

More on Variables

All you would do to your script is this:

circle=game.Workspace.circle --You need to define what "circle" is. If the object is literally called circle then you would put "game.Workspace.circle.Mesh.Scale" instead of "circle.Mesh.Scale"
wait(0.1)
 circle.Mesh.Scale = Vector3.new(0.6,1,0.6) 
wait(0.1) 
circle.Mesh.Scale = Vector3.new(0.75,1,0.75)
 wait(0.1)
 circle.Mesh.Scale = Vector3.new(1,1,1) 
wait(0.1) 
circle.Mesh.Scale = Vector3.new(1.4,1,1.4)
 wait(0.1)
 circle.Mesh.Scale = Vector3.new(2,1,2)
0
Aw you have 137 Reputation. I have 138. You're closer to 1337. EzraNehemiah_TF2 3552 — 9y
Ad

Answer this question