Transform size of object in game

Im about 4 hours into Core scripting

I want to be able to transform the scale of an object based on in-game variables. I've looked at the light switch tutorial but am struggling... The light switch tutorial uses RotateTo which isnt in the rotation docs

Seems like it should be something like this:

local gameObject = script.parent
print(gameObject)

local gameObjectScale = gameObject.getScale()
print(gameObjectScale)

gameObject.setScale(newValue)

Would anyone mind giving me a rough code example?

local gameObject = script.parent
print(gameObject)
local gameObjectScale =  gameObjec:GetWorldScale()
gameObject:SetWorldScale(Vector3.New(newValue))
gameObject:RotateTo(Rotation.New(xVar,yVar,zVar)
gameObject:ScaleTo(Vector3.New(newValue+1,newValue+3,newValue+2))

Hope this ie enough for you to see how vector3s and rotations and Core Object methods work. Good luck learning!

Perfect, thanks

Thanks, but any idea how to apply this to terrain. There is no documentation for Terrain objects. I need to find the dimensions of the map.