remotes.DropPlayerItem.OnServerInvoke = function(Player, DropName)
print("Works!")
local Drop = ReplicatedStorage.Assets.Drops:FindFirstChild(DropName)
if Drop then
Player.Materials[DropName].Value -= 1
print(Player.Materials[DropName].Value)
end
end
Hard to solve this without further information such as full code samples? Also, since your remote signal doesn’t return anything, why are you using a function instead of an event?
The drop count going up by 1 with each click suggests that somewhere in your code you’re creating a new on click binding that calls the remote function. Put a debug print statement, ideally with a debug.traceback(), where you connect up the MouseButton1Click binding, and see why it’s getting called when you click.
im using a remote function because i need the info to go from client to the server so other players can see what the player has dropped: ooga booga (reborn) drop mechanic
local ExistingSlot = Inventory.MainFrame.ScrollingFrame:FindFirstChild(Material.Name)
if ExistingSlot then
if Material.Value == 0 then
ExistingSlot:Destroy()
else
ExistingSlot.TextAmount.Text = "X"..Material.Value
end
else
local Slot = CreateSlot(Material)
Slot.MouseButton1Click:Connect(function()
print("clicked")
ShowInfo(Slot) -- at the end the thing was creating a
--new mouse1click every time this function was called
end)
end