Hello robloxians! I wants to do that: if someone enters the wrong password, the gui password appears in the animation and disappears. But he does not want to act. Somebody knows why?
local Wrongpasswordtryagain = script.Parent
game:GetService("UserInputService").InputBegan:Connect(function(InputObject, Wrongpasswordtryagain)
if InputObject.Key == Enum.KeyCode.Enter then
script.Parent.Parent.Parent.Wrongpasswordtryagain.Visible = true
coroutine.resume(coroutine.create(function()
Wrongpasswordtryagain:TweenPosition(UDim2.new(0.5, 0, 0.0, 0))
wait(5)Wrongpasswordtryagain:TweenPosition(UDim2.new(0.5, 0, -0.3, 0))
end))
end
end)

1 comment
TextBox.FocusLost(function(PressedReturn)) is a more efficient way of handling this.