So I have been trying to send data from a client script to another one through a bindable function and the bindable function just doesn’t work. I tried to debug but nothing is priting. But it’s only when I reload my script that the bindable function is starting to work which is kind of confusing. Here is my script:
The “Firing” script:
local bfunctions = game.Players.LocalPlayer.Character:WaitForChild("Function")
bfunctions:Invoke("SetM1s",selected.Name)
The “Fired” script:
local bfunctions = game.Players.LocalPlayer.Character:WaitForChild("Function")
bfunctions.OnInvoke = function(state,o)
print("fired")
if state == "SetM1s" then
M1s = {
animator:LoadAnimation(shootAnimsF.M1s[o]:WaitForChild("Punch1")),
animator:LoadAnimation(shootAnimsF.M1s[o]:WaitForChild("Punch2")),
animator:LoadAnimation(shootAnimsF.M1s[o]:WaitForChild("Punch3")),
animator:LoadAnimation(shootAnimsF.M1s[o]:WaitForChild("Punch4")),
}
RollingAnims = {
["Forwards"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("FRoll")),
["Right"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("RRoll")),
["Left"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("LRoll")),
["Backwards"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("BRoll")),
["RollJump"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("RollJump")),
["AirRollTouch"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("AirRollTouch")),
["RollTouch"] = animator:LoadAnimation(shootAnimsF.Rolling[o]:WaitForChild("OnRollTouch")),
["RollAttack"] = animator:LoadAnimation(shootAnimsF.Rolling[o].RollAttack),
}
SkyJumpAnims = {
["Forwards"] = animator:LoadAnimation(skyjumps[o].SkyJumpForwards),
["Right"] = animator:LoadAnimation(skyjumps[o].SkyJumpRight),
["Left"] = animator:LoadAnimation(skyjumps[o].SkyJumpLeft),
["Backwards"] = animator:LoadAnimation(skyjumps[o].SkyJumpBack),
["Nil"] = animator:LoadAnimation(skyjumps[o].SkyJumpNone)
}
SpecialsAnims = {
AttackCounter = animator:LoadAnimation(shootAnimsF.Specials[o].AttackCounter),
CounterAttackHit = animator:LoadAnimation(shootAnimsF.Specials[o].CounterAttackHit),
}
end
end
If anyone have any so solution to this problem please help!
(also it was working perfectly fine yesterday and i haven’t touched to anything)