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

How do I make parts scale itself with a button?

Hi, I want my part to scale itself by using a button.

I have tried many scripts but it doesn't work.

If you could do it for me that'd be great!

6 comments

0

????

0

Basically I am saying that when you click a part in roblox how can it scale itself

0

also we dont accept people that requests scripts for other people to create for you

0

make a attempt

0

also just to give you an idea, you could listen for the MouseClick event of ClickDetector and then set the size of the part using the Vector3.new() constructor; which takes in x,y,z values if you didn't know

1 answer

✓ Accepted answer

First place two parts in workspace: One named 'Button' One named 'Part'

Then, inside 'Button' place a Click Detector, and inside the click detector place a Script

Inside that script, first set a variable for the part.

local part = game.Workspace.Part

Next connect MouseClick

script.Parent.ClickDetector.MouseClick:Connect(function ()
	--Scaling

	local originalSize = part.Size
	part.Size = originalSize + Vector3.new(10,0,0) 

end)

The Vector3.new(10,0,0) is for you to decide. Changing the (x, y, z) of the Vector3 to whatever you choose or however you want to scale it per click.

1 comment

0

At the end of the day, it's best you show a failed attempt or some code for people to help you with.. Just asking for people to do it isn't the best route. That being said hope i was able to help

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