Is there a way to disable a specific player's character from loading?

You can write your topic however you want, but you need to answer these questions
:

  1. What do you want to achieve? Keep it simple and clear!

I want to disable respawning for a specific player, not all of them.

  1. What is the issue? Include screenshots / videos if possible!

I know you can disable respawning through the players service through “CharacterAutoLoads”, but this would effect all players right? I wanna disable it for a specific player, I’m sure you could do that through a local script and just doing game.Players.CharacterAutoLoads = false and it’d just do it for that player but is there not another way surely?

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Searched on the devforum/documentation, no dice.

It’s not really an issue as I can disable a specific player’s character auto loading through a local script. But I wanna know if there’s actually a built in function for this?

1 Like

Quick update, just realised you can’t disable it through a client. So now I’m even more stuck.

local Players = game:GetService("Players");
Player.CharacterAutoLoads = false -- Note, this is every character such that they can not spawn automatically unless you script them to do so
local player = -- Get the player object in any method you desire

-- However, since we only want a specific character to not spawn, make it so the following function
player:LoadCharacter() -- Explicity use this function for all the characters you WANT to spawn and do some logic to not allow the character you don't want to spawn

Note, this explicitly has to be in a ServerScript, preferably in ServerScriptService to work

An example of logic you could implement is to:

  • Get all the players in an array
  • Remove specific players from the array you don’t want to spawn
  • run :LoadCharacter function on each player you want to spawn in a loop

Here, I just did the thinking for you, script it yourself as that is the true learning

local blacklistedCharacters = {}
local Players = game.Players

Players.PlayerAdded:Connect(function(player)
	if not table.find(blacklistedCharacters,player.UserId) then
		player.CharacterAdded:Connect(function(character)
			local humanoid = character:WaitForChild("Humanoid")
			humanoid.Died:Connect(function()
				task.delay(Players.RespawnTime,function()
					player:LoadCharacter()
				end)
			end)
		end)
		player:LoadCharacter()
	end
end)

This is a custom character loader which you could now use to blacklist characters! Or just whitelist as well!

2 Likes

That’s not my problem, I want to disable a specific player’s capability of respawning. I literally said I know how to use characterautoload but that would stop all players from respawning. I just want respawning to be disabled for one player.

I think this might be a good idea, what I could do is set the players’ respawn time as infinite before runtime. Then load it whenever I want to. Thanks for actually reading the topic.

So um, not really gonna use the code but I guess that’s my fault for making it hard to understand what I wanted. But the respawntime idea is what I’m gonna take. I already know how to blacklist and whitelist players so that’s fine.

But the problem is by doing that it’s still technically disabling respawning for every player. I was asking if there is some sort of built in function to whitelist/blacklist a specific player from respawning. I know I can just blacklist/whitelist it but that’s just weird. But now I guess I know there isn’t.

Also what the hell? Why’d you delete it? Bring it back up I bet alot of us wanna read what you said.

Also nice phrase, numpty. Ima use that to troll my friends whenever I get the chance.

Yeah numpty sounds like a python library

Okay well can you bring back up the post.

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