Basically,like a front flip animation to work.It will need to press the keys Z and X is it possible?
I'm not trying to say can you script it for me.
Basically,like a front flip animation to work.It will need to press the keys Z and X is it possible?
I'm not trying to say can you script it for me.
You can use GetKeysPressed
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Z or input.KeyCode == Enum.KeyCode.X then
local keys = uis:GetKeysPressed()
local xFound, zFound
for _, key in pairs(keys) do
if key.KeyCode == Enum.KeyCode.Z then
zFound = true
elseif key.KeyCode == Enum.KeyCode.X then
xFound = true
end
end
if zFound and xFound then
print("both keys")
end
end
end)
Sorry for the most LATEST reply but thanks!It worked
no problem
I think that it is possible. Try something like this:
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Z and input.KeyCode == Enum.KeyCode.X then
-- Code here
end
end)
-- Not quite sure will this work ^^
that wouldn't work, InputBegan will fire twice (once for Z, once for X)
nice try tho
thx bro
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
You can use the IsKeyDown method of UserInputService