What do you want to achieve?
I just want the player name
What is the issue?
The receiving (local script) end gets nil but the sender (server script) end prints the name.
What solutions have you tried so far?
Ive looked around on devforum but nothing helped and ive tried different varieties of sending the player name, nothing has worked.
--Server script
if player then
local donoRE = ReplicatedStorage:WaitForChild("SystemMessengerEvents").MessageREs.DonationMessageREs:FindFirstChild("Donated" .. donatedAmount)
print(donoRE)
print(game:GetService('Players'):FindFirstChild(player.name))
donoRE:FireClient(game:GetService('Players'):FindFirstChild(player.name))
print("DONE")
end
You never send the player name to the client.
You want to do RemoteEvent:FireClient(player, playerName) with player being the client you are sending the info to.
With RemoteEvent:FireClient() the first argument always has to be the client/player you are sending the information to. RemoteEvent:FireClient(player) sends the information to one certain player RemoteEvent:FireAllClients() doesn’t take a player argument as it sends information to all clients