I can't figure out how to make the script make the cookie increase size then wait and decrease back to normal size whenever it's clicked. Please help!
1 | function Click() -- When the cookie is clicked |
2 | Player.Cookies.Value = Player.Cookies.Value + 1 |
3 | script.Parent.Size = Vector 3. new { 0 , 300 } , { 0 , 300 } |
4 | wait( 0.15 ) |
5 | script.Parent.Size = Vector 3. new { 0 , 250 } , { 0 , 250 } |
6 |
7 | end |
8 | script.Parent.MouseButton 1 Click:connect(Click) |
GuiObject's size and position properties do not hold Vector3 datatypes. They require UDim2 datatypes.
1 | function Click() -- When the cookie is clicked |
2 | Player.Cookies.Value = Player.Cookies.Value + 1 |
3 | script.Parent.Size = UDim 2. new( 0 , 300 , 0 , 300 ) |
4 | wait( 0.15 ) |
5 | script.Parent.Size = UDim 2. new( 0 , 250 , 0 , 250 ) |
6 | end |
7 |
8 | script.Parent.MouseButton 1 Click:connect(Click) |