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

New at scripting - how to change mesh scale?

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

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)

1 comment

0

Aw you have 137 Reputation. I have 138. You're closer to 1337.

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