How to fix "Players is not a valid member of Player "Players.MaxRobuxy"

  1. What do you want to achieve? Keep it simple and clear!
    Ans. So i want the Player who is chosen as a Murderer to be cloned into a Murderer Character.

  2. What is the issue? Include screenshots / videos if possible!
    Ans. Idk why but when i try to clone the specific Rig/Character it wont morph the player into it and gives this error message "Players is not a valid member of Player “Players.MaxRobuxy”

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Ans. i tried: killerChar:Clone().Parent = chosen.players also tried killerChar:Clone().Parent = chosen.Players.localplayer but both did not work :frowning:

    any solutions?
    thanks a lot if you’re reading this!

–Pics–


1 Like

I think you are trying to parent a player inside a player

killerChar:Clone().Parent = chosen     --.Players.LocalPlayer

i guess this should work
edit: you need to name variables as clear as possible otherwise you’d end up confused

local players = plrs:GetPlayers()
local ChosenPlayer = players[math.random(1,#players)]
3 Likes
  1. it looks like chosen is a player, so it wouldn’t have a child or property named Players and that child/property wouldn’t have anything called LocalPlayer.
  2. To change/reference the player character, you would use the Player.Character property (in this case, chosen.Character).
    Implementation:
local KillerCharacter = killerChar:Clone() -- Clones the character
KillerCharacter.Parent = workspace -- This will put the character into the game space
chosen.Character = KillerCharacter -- This is what you were trying to do, and this will make the chosen player's character the killer character.

First question is: Is this a server script?

Scratch that… ^ can handle it.

it does not work for some reason…

Yes, it is a Server Script…

which part of the code errors?

Could you show your current code?

1 Like

Alright ill, share a screenshot of the script.

Here is the pic of the Code im making,


so… is there any way to fix it?

I see you haven’t assigned any variable “Players” unless you have but I just haven’t seen it, if it is something like a folder or a model or any instance and not a service then use chosen:FindFirstChild("Players") because you might be confusing it with the service Players

1 Like