why wont my script work? local MarketplaceService = game:GetService("MarketplaceService")
local TweenService = game:GetService("TweenService")
local AdTemplate = script.Parent:WaitForChild("AdTemplate")
local adSize = AdTemplate.Size
local adSizeIn = adSize - UDim2.fromOffset(60, 40)
local outPos = AdTemplate.Position
local poptime = .25
--// Ads
local SHOWTIME = 10
local FIRST_DELAY = 1
local ads = {
1290510557,
1290664561,
1290698384,
}
local function BtnAnimations(btn)
local btnSize = btn.Size
local btnOutSize = btnSize = UDim2.fromOffset(20,10)
local btnInSize = btnSize - UDim2.fromOffset(20,20)
btn.MouseEnter:Connect(function()
btn:TweenSize(btnOutSize, Enum.EasingDirection.Out, Enum.EasingStyle.Back, poptime, false)
end)
btn.MouseButtonClick:Connect(function()
btn:TweenSize(btnInSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, poptime, true)
end)
btn.MouseLeave:Connect(function()
btn:TweenSize(btnSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, poptime, true)
end)
end
BtnAnimations(AdTemplate.Buttons:WaitForChild("BuyButton"))
BtnAnimations(AdTemplate.Buttons:WaitForChild("CancelButton"))