I’m working on a GUI Button effect, when you click it down, it’s size goes down, when you when you unclick it, its size goes back to normal. I’ve been working on this for a little but the button doesnt change its size. The output doesnt give me any error. Anyone know why it isnt working.
for i,v in pairs(GUI.Tokens:WaitForChild("List"):GetChildren()) do
if v:IsA("Frame") then
v:WaitForChild("BTN"):WaitForChild("Purchase").MouseButton1Down:Connect(function()
v:WaitForChild("BTN"):WaitForChild("Purchase"):TweenSize(UDim2.new(0, 136,0, 26), "In", "Quint", .05)
end)
v:WaitForChild("BTN"):WaitForChild("Purchase").MouseButton1Up:Connect(function()
v:WaitForChild("BTN"):WaitForChild("Purchase"):TweenSize(UDim2.new(0, 143,0, 30), "Out", "Quint", .05)
end)
local player = game.Players.LocalPlayer
v:WaitForChild("BTN"):WaitForChild("Purchase").MouseButton1Click:Connect(function()
script.Parent.Click:Play()
local ID = v:WaitForChild("ID").Value
MPS:PromptProductPurchase(player, ID)
MPS.PromptPurchaseFinished:Connect(function()
GUI.Purchase:Play()
end)
end)
end
end