Im trying to make a combat game using server side scripts, i know that the user input service is only for local but im trying to be able to use events to make inputs server side as well to be able to preform attacks.
A Issue i have came across is that i found a script able to achive one time button attacks but not holdable attacks (such as blocking) using a get strong for keycode.
Local script:
UIS.InputBegan:Connect(function(Input , IsTyping)
if not IsTyping then
script.Parent.KeyBindEvent:FireServer(UIS:GetStringForKeyCode(Input.KeyCode))
end
end)
Serverside Script:
script.Parent.Parent.UniversalScripts.KeyBindEvent.OnServerEvent:Connect(function(plr, key)
if key == "E" and blah == false and blah == false and blah == 1 then
Mode = 2
a issue with this is that when trying to make a block system or a holdable attack the script will up right break making it so if you hold block and press anything on the keyboard it cancels it (such as left or right click to look around) i have been asking my friends if theres a better way of making a local to server side input script but i found thing
Summery: I want to be able to have a updated version of a local script to server side script input system that can handle one time press attacks and holdable attacks such as blocking