So I'm working on a medikit tool (not really for a certain game, I'm just trying to learn how to use remote functions and events since FE is now forced on every game), and I've properly set it up and stuff. The problem is, it doesn't seem to work, despite the fact that nothing seems to appear in the output log related to my scripts.
The local script's content is
script.Parent.Parent.Activated:Connect(function()
game.ReplicatedStorage.Heal:InvokeServer(25)
script.Parent.Parent:Destroy()
end)
The script is inside a tool's handle.
The server script, which is in ServerScriptStorage, has the following content:
local function heal(player, x)
player.Character.Humanoid.Health = player.Character.Humanoid.Health
end
game.ReplicatedStorage.Heal.OnServerInvoke = heal
I know I'm doing something wrong since it won't work, but why won't it?

3 comments
I was thinking of being able to use the function with multiple scripts but that's fine too I guess, thanks.
nevermind i forgot to add "+ x" at the end now i fixed it and it works, thanks anyways.
Np.