I have this local script in my Player's Gui
print("Starting")
game.ReplicatedStorage:WaitForChild("GetStat"):InvokeServer("swordSkill")
print("Finished")
And this inside a bindable function within the ReplicatedStorage
function script.Parent.OnServerInvoke(player,statName)
print("Invoked")
return game.ServerStorage:FindFirstChild(player.Name):FindFirstChild(statName).Value
end
The Local Script starts, but when it reaches the invoking line, it hangs up and stops. There's no error, and the script inside the bindable function doesn't run. I've tried other methods for my script including:
script.Parent.OnServerInvoke:Connect(function(player,statName)
print("Invoked")
return game.ServerStorage:FindFirstChild(player.Name):FindFirstChild(statName).Value
end)
and
script.Parent.OnServerInvoke = function(player,statName)
print("Invoked")
return game.ServerStorage:FindFirstChild(player.Name):FindFirstChild(statName).Value
end
All produce the same results. Why isn't the bindable function being invoked?

1 comment
Forgot to check this again but thank you very much!