I can't seem to figure this out and it's a major issue for my game, but how do I fix the scaling? I have the blocks scale up or down based on it's value within it, but whenever someone changes the value higher while standing on it, the block glitches and goes above the player's head.

MyValue.Changed:connect(function()
	if White.Value == 0 then
		script.Parent.Material = "Brick"
	end
	if Red.Value > 0 then
		script.Parent.BrickColor = BrickColor.new(332)
	elseif Blue.Value > 0 then
		script.Parent.BrickColor = BrickColor.new(1011)
	elseif Green.Value > 0 then
		script.Parent.BrickColor = BrickColor.new(304)
	elseif Yellow.Value > 0 then
		script.Parent.BrickColor = BrickColor.new(1017)
		print(script.Parent.BrickColor)
	end
	local NewSize = ((math.log(MyValue.Value+2))*3) + 100
	MyParent.Size = Vector3.new(20, NewSize, 20)
end)

Here's the simple part that controls the scaling for the guy asking for it.

7 comments

1

Can you show us code?

0

Well, here's the simple part that controls the scaling.

0

Added to the original post.

0

Anchor the part when you change it's size so that it can't move, then unanchor it.

0

Umm, they're anchored by default.

0

Well, I don't know then, sorry :/

1

CFrame will keep a part in a spot regardless of it's surrounding changes.