✓ Accepted answer
I think you need to write this above the Frame:TweenPosition:
Frame.Position = UDim2.new(0.257,0,-1((for example)),0)
OR
local Frame = game.Players.LocalPlayer.PlayerGui.CodeDoorGUI.Frame
workspace.Part.Touched:Connect(function(hit)
local H = game.Players:GetPlayerFromCharacter(hit.Parent)
if H then
Frame.Position = UDim2.new(0.257,0,-1((for example)),0)
Frame:TweenPosition(UDim2.new(0.257,0,0.264,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,0.8,true)
end
end)
OR
workspace.Part.Touched:Connect(function(hit)
local H = game.Players:GetPlayerFromCharacter(hit.Parent)
local Frame = H.PlayerGui.CodeDoorGUI.Frame
if H then
Frame.Position = UDim2.new(0.257,0,-1((for example)),0)
Frame:TweenPosition(UDim2.new(0.257,0,0.264,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,0.8,true)
end
end)
i don't think this would work because I haven't tested it yet :]
1 comment
you didn't set the tween style