--unbinding and rebinding melee moves with remote event (THE SCRIPT ABOVE ^^^ MAY BE REPLACED BY THIS IF I CARE ENOUGH)
game.ReplicatedStorage.abilityRemoteEvents.meleeDisabler.OnClientEvent:Connect(function(limit)
--unbings melee keybinds for a set amount of time
CAServ:UnbindAction("Left Punch")
CAServ:UnbindAction("Right Punch")
CAServ:UnbindAction("Kick")
--wait "limit", then rebind
wait(limit)
CAServ:BindAction("Left Punch", leftPunch, false, Enum.UserInputType.MouseButton1)
CAServ:BindAction("Right Punch", rightPunch, false, Enum.UserInputType.MouseButton2)
CAServ:BindAction("Kick", kick, false, Enum.KeyCode.E)
end)
server script
--fire remote event "meleeDisabler" to disable melee moves
game.ReplicatedStorage.abilityRemoteEvents.meleeDisabler:FireClient(plr, 12)
yeah it just doesnt work (it doesnt unbind the functions for the melee stuff, im still able to use thme)
no errors, nothing
yes, in the full script the keybinds are bound beforehand, so it shouldnt be because i unbound them before i rebind them
i did do a print, and it didnt print??? so i guess the remote event isnt being called?
but i dont know why?
because that line of code that calls the remote event happens before everything else in the remote event function script, and everything else runs perfectly
is this like when you try to reference the character, but it hasnt been loaded in yet? the character being the .OnClientEvent and the :FireClient() being the script referencing the “character”?
if thats what you mean, then it should have been loaded in a long time ago; its in the same script as melee moves, and that works fine
and the remote event is called loooong after the game has finished loading so