Player.Name prints out nil

Where is your ServerScript located? Your issue is probably because the PlrNames StringValue isn’t replicated, so trying to send it over turns it into nil. You parented it to the script, but depending on the script’s location it’s not replicating.

image_2025-01-03_131042291

That would explain it. ServerScriptService isn’t visible to clients, so PlrNames doesn’t replicate and becomes nil when you try to send it over.

2 Likes

You’re not giving the StringValue enough time to replicate on top of that. I don’t see a need for StringValues anyways. Just send the player’s username directly

Nope, it will never replicate because it’s not in a container that can replicate. Please read this article on the documentation: Remote Events and Callbacks | Documentation - Roblox Creator Hub

So what would I need to do? (Character Limit)

I am extremely familiar with the Roblox engine. I know it will fail to replicate. What I am saying is that in the event it would, not enough time is given to allow the instance to replicate—this is a factor to consider in the coming solution

Again, I don’t see the need to use StringValues here, or at least the need to send the one you created. Simply send the player’s username

1 Like

So something like this?

	ReplicatedStorage.JoinServers.JoinServerPlayer:FireAllClients(player.Name)

Yes. Something exactly like that

1 Like

Nope it still is nil

1 Like

I do not see any issues with your code beyond this point. It would be easier to diagnose the issue live. Add me on Discord @ziffix

This is also wrong. When you send an instance over a remote, it will prioritize replication if it wasn’t already available on the client. It will not happen if the instance is inherently non-replicable, or if the instance is outside of the streaming radius.

Alr, I sent a friend request!!!

Workspace.StreamingEnabled is enabled by default, hence my concern

Guys stop the beefing, we have different opinons on topics, and someone’s topics may be more correct over anothers but we do not need to ramble over and over again. :cry:

Anyways fellas, the text label still says nil.

Any one know how to fix it?

I’m awaiting further communication in DMs

1 Like

The issue has been resolved. Problems included:

  1. Source of username propagation failure: override of OnServerInvoke callback later in the script

  2. Source of nil username: additional firing of JoinServerPlayer event with no arguments in separate script

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.