Before you read my question, please be aware that I'm new to scripting so try to explain it in a simple way so I can understand. So basically what I want to know is how to use the Absolute Position as an if so if the Absolute Position is something specific like 80, 800 then a function is triggered. The problem is the comma because it breaks the script. I'll put the entire Local Script below.
local Player = game.Players.LocalPlayer
local GB = script.Parent
local GF = script.Parent.Parent["Gift Frame"]
GB.MouseButton1Click:Connect(function()
if GF.AbsolutePosition == 80, 800 then
GF:TweenPosition(UDim2.new(0, 80, 0, 15), "Out", "Bounce")
else
GF:TweenPosition(UDim2.new(0, 80, 0, 800), "Out", "Bounce")
end
end)

2 comments
This is because you’re dealing with a malformed comparison conditional. If you wish to match data, you have to do so within the same datatype. Since AbsolutePosition is a UDim2, you need to write: If (Gui.AbsolutePosition == UDim2.new(0,0,0,0)) then
Oh, thank you very much. As I said I just started scripting so I don't know exactly how everything works, this helped a lot.