The script below works completely fine but it still works whilst typing, this is REALLY irritating..how do I stop this?
Player = game.Players.LocalPlayer
Player.CharacterAdded:connect(function(Character)
enabled = true
enabled2 = true
able = script.able
local function onInputObject(inputObject,gameProcessed)
if inputObject.KeyCode == Enum.KeyCode.M then
if enabled2 == false or able.Value == false then
return
end
enabled2 = false
if enabled == true then
enabled = false
script.Parent:TweenPosition(UDim2.new(0.245, 0, 0, 0), "Out", "Quad", 1)
elseif enabled == false then
enabled = true
script.Parent:TweenPosition(UDim2.new(0.245, 0, -1.4, 0), "In", "Quad", 1)
end
enabled2 = true
end
end
game:GetService("UserInputService").InputBegan:connect(onInputObject)
end)

2 comments
Thanks for that
No problem :3