#anim help
1 messages · Page 1 of 1 (latest)
user input service input began and input ended
im really new to coding could you help me with an exact script on how?
dont mean to take your time
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(gpe, input)
if gpe then return end
if input.KeyCode ~= Enum.KeyCode.Space then return end
-- Holding
end)
UIS.InputEnded:Connect(function(gpe, input)
if gpe then return end
if input.KeyCode ~= Enum.KeyCode.Space then return end
-- Released
end)
my bad i messed up a bit
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode ~= Enum.KeyCode.Space then return end
-- Holding
end)
UIS.InputEnded:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode ~= Enum.KeyCode.Space then return end
-- Released
end)
here's the correct code
Don't copy paste that. When you want to continue a behavior after a key is pressed, use IsKeyDown polling to validate, that method is unreliable.
https://create.roblox.com/docs/reference/engine/classes/UserInputService#IsKeyDown
For example if your player opens the chat while holding space or anything else turns that key release into a gameprocessed event, it will fail to end the behavior
** You are now Level 7! **
ah ok
** You are now Level 1! **
Wait I just want to say, I have no idea how to script and I don't know how to link my animation to the script
then go learn watch some alvin blox tutorials fam
** You are now Level 14! **
go make the foundation before u start bullding
Yep
it's like high beginner level stuff though, watch some tutorials and you can resume on your own in a few days
i like literally made everything else in the game
all i need now is the animation script
im really sorry if im right up your spine right now but im panicking as i need to get this done in 1 hour for release
Then tell people there are technical difficulties and you need to release later if its your game