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!
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!
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.
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.
6 comments
????
you should probably look at this https://scriptinghelpers.org/help/how-post-good-questions-answers
Basically I am saying that when you click a part in roblox how can it scale itself
also we dont accept people that requests scripts for other people to create for you
make a attempt
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