Hi, I want to make a feature where if you point your mouse at a part, it’s (size.Y) will decreased by like how the mouse is down at the part, like how the mouse is down of the part the part’s size(Y) will be decreased by that, Any help?
1 Like
Do you mean how do you allow the player to scale a brick by its y value?
No, when the player clicks on a part it’s size(Y) will be decreased by how mouse is down.
Correct, but with Y-axis. Not the Z
I mean the part’s size will be decreased by Y
i keep messing up
So essentially it looks like you’re attempting to use the Mouse Cursor to Scale Objects based off of its mouse coordinates.
Maybe this will help: Mouse Bigger on Part Hover - #6 by ExcessEnergy
Instead of making the part bigger, make it decrease by Y
Yes, thanks for understanding I’m bad at explaining
1 Like
So how am i gonna achieve this?
Read the link I sent you two posts ago
Oh, sorry, I didn’t see the link.
That didn’t help me. Anything else?
@L_aarge I wrote this code:
local Player = game.Players.LocalPlayer;
local Mouse = Player:GetMouse();
local cuttingsize = 2;
Mouse.Button1Down:Connect(function()
if Mouse.Target then
if Mouse.Target:IsA("Part") then
local size = Vector3.new(Mouse.Target.Size.X, Mouse.Target.Size.Y - cuttingsize, Mouse.Target.Size.Z)
Mouse.Target.Size = size
end
end
end)
ain’t working properly.