#Scripting
21 messages · Page 1 of 1 (latest)
what
elseif
Can you elaborate further?
word
@midnight helm show me what you mean by code
since i can't understand what you just said
this is my code idk how to word my question but i have a move set how do i put it in there without having to paste the same code to use one move
cuz when i press R the move works
but when i was playhing around trying to fit it where i can use T i cant
Use table
Man Roblox table
For example
local keyFuncs = {
R = function()
print("Hello")
end,
T = function()
print("world")
end
}
[OnKeyPress](input, gameprocess)
local str = tostring(input.KeyCode)
local letter = str:split()[1]
if not keyFunc[letter] then return end
keyFunc[letter]()
end
Not exactly this but something similar you get the idea
so when i do local keyfuncs i put R= "roblox animation ID"
if you want yes
good question