I'm doing what it saying to do but still gives this error: game.Players.Noman538.PlayerGui.EventGui.Frame.LocalScript:10: Expected ')' (to close '(' at column 28), got ','
local UIS = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Gui = script.Parent.Parent local Frame = Gui.Frame local CloseButton = Frame.Roundy.CloseButton UIS.InputBegan:connect(function(P2) if P2.KeyCode == Enum.KeyCode.Q then Frame:TweenPosition(UDim2.new(0.5, 0,0.5, 0),"InOut","Sine", 1.2) elseif Frame.Position == (0.5, 0,0.5, 0) then Frame:TweenPosition(UDim2.new(0.5, 0,1.5, 0),"InOut","Sine", 1.2) end end end) CloseButton.MouseButton1Click:Connect(function() Frame:TweenPosition(UDim2.new(0.5, 0,1.5, 0),"InOut","Sine", 1.2) end)
Not tested, but try:
local UIS = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Gui = script.Parent.Parent local Frame = Gui.Frame local CloseButton = Frame.Roundy.CloseButton UIS.InputBegan:connect(function(P2) if P2.KeyCode == Enum.KeyCode.Q then Frame:TweenPosition(UDim2.new(0.5, 0,0.5, 0),"InOut","Sine", 1.2) elseif Frame.CFrame == CFrame.new(0.5, 0,0.5, 0) then Frame:TweenPosition(UDim2.new(0.5, 0,1.5, 0),"InOut","Sine", 1.2) end end end) CloseButton.MouseButton1Click:Connect(function() Frame:TweenPosition(UDim2.new(0.5, 0,1.5, 0),"InOut","Sine", 1.2) end)