So I send a FireClient() with one argument. Code (server script):
local amountRepaired = script.Parent.Repaired.Value rpl.UpdateRepair:FireClient(Player, amountRepaired)
I already checked and amountRepaired is not nil. But when this is received through OnClientEvent (local script):
local function onUpdateRepair(amount) player.PlayerGui.gui.RepairFrame.Visible = true player.PlayerGui.gui.RepairingText.Visible = true player.PlayerGui.gui.RepairFrame.Bar.Size = UDim2.new(1/(100/amount), 0, 1, 0) end replicatedStorage.HideRepair.OnClientEvent:Connect(onUpdateRepair)
It gives me the error that it can't divide by nil and also when I print amount out it just prints nil. I've been trying to figure this out for a while so if someone can help me with this it would be greatly appreciated.