All I am trying to do is sent a single number from the server to a single client. This should be easy, but I keep getting a “nil” in the client script. What am I doing wrong? I am totally stumped.
Server script:
Remaining:FireClient(player, number)
The remote event is in ReplicatedStorage and is called “Remaining”. I checked and the value “number” is correct and player is identified. There doesn’t appear to be an error on this side.
Client Script:
local player = game.Players.LocalPlayer
local textbox = script.Parent
local Remaining = game.ReplicatedStorage.Remaining
Remaining.OnClientEvent:Connect(function(player, number)
print(number)
textbox.Text = number …" Left in Backpack"
textbox.Visible = true
wait(.5)
textbox.Visible = false
end)
All I get is the error message “attempting to concatenate nil with string.” The print (number) shows me that the client is getting “nil” for number.
Shouldn’t it be possible to pass data through remote events like this? What am I missing?