-- Made script that shrinks a frame as I hold down button.
Why it not work?
local uis = game:GetService("UserInputService")
local shrinking = false
local r = 1/1000 -- gui should shrink by 0.1% on wait() but doesn't 0.001 as a percentage is 0.1%
local gui = script.Parent -- change this at your discretion
function Shrink()
shrinking = true
while shrinking do
local s = gui.Size
gui.Size = s - UDim2.new(s.X.Scale*r,s.X.Offset*r,s.Y.Scale*r,s.Y.Offset*r)
end
end
uis.InputBegan:connect(function(input,gp)
if input.UserInputType == Enum.UserInputType.Keyboard and gp then
if input.KeyCode == Enum.KeyCode.LeftShift then
Shrink()
end
end
end)
uis.InputEnded:connect(function(input,gp)
if input.UserInputType == Enum.UserInputType.Keyboard and gp then
if input.KeyCode == Enum.KeyCode.LeftShift then
shrinking = false
end
end
end)

8 comments
What does it do when you hold down LeftShift?
Did you check too see if there were any errors in the Output? If so, could you please tell us what it said?
Try making a GUI and put the script in the GUI or in Serverscriptservice
I did and No output errors. The frame supposed to decreases in size for as long as I hold down left shift. Script not work.
if no one help me, then how do I move forward?
For one, you didn't set line 4, and line 3 will be 0.001: not 0.1.
0.1% = 0.001. Try to google "0.1% to decimals" for proof
Even if I increase it still doesn't work though. i did like 900/1000 nothing happened