Hi. I've been doing an Ammo GUI, and one of the things I need to do is have a RemoteEvent FireClient whenever a tool is equipped, and whenever the ammunition values change, it also fires a different RemoteEvent. The two RemoteEvents are created by a server script, and stored under ReplicatedStorage in a Group, under the player's name. The client script then accesses these RemoteEvents, and listens for any time the client event is fired. However, the Client Script function doesn't fire. Here's the relevant code; thank you if you try to help:
Server Script:
functionGroup:WaitForChild("ToolEquipped"):FireClient(player, tool.Name, tool.Main.Ammo, tool.Main.StoredAmmo)
tool:WaitForChild("Main").Ammo.Changed:connect(function()
functionGroup:WaitForChild("AmmoChanged"):FireClient(player, tool.Main.Ammo, tool.Main.StoredAmmo)
end)
Client Script:
functionGroup:WaitForChild("AmmoChanged").OnClientEvent:connect(function(plr, ammo, storedAmmo)
print("Connected to Client AmmoChanged Function")
if ammo ~= nil and storedAmmo ~= nil then
updateGUI(ammo, storedAmmo)
print("Now Updating GUI")
end
end)
