I have a gui to move a certain direction. It works fine for the first few times i press the button, but after a few more times of pressing the button, it moves faster. Why?
local uis = game:GetService("UserInputService") uis.InputBegan:Connect(function(input) while wait() do if uis:IsKeyDown(Enum.KeyCode.Left) then script.Parent.Position = script.Parent.Position - UDim2.new(0, 2, 0, 0) print(script.Parent.Position.X.Offset) elseif uis:IsKeyDown(Enum.KeyCode.Right) then script.Parent.Position = script.Parent.Position + UDim2.new(0, 2, 0, 0) end end end)