character = game.Workspace.Player player = game.Players:GetPlayerFromCharacter(character) torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")
It tells me that Player is not a valid member of Workspace. I feel like its something simple that Im missing here....
Please help!
The dot (.
) tries to find the child of an object by name. Your script errors because there is nothing named "Player" inside workspace.
There are character models, but those are named things like "Perci1", "Eagle_RG", "bob123", etc. It's just your username. There is nothing named "Player".
Your specific solution depends on your specific situation. For example, is this a local script? Is this for a touched event? It this when people join the game? Each of these has different solutions, so I would need to know what exactly you want to happen before I can help further.
From what I've seen, you're trying to get the players character model:
for i, player in pairs (game.Players:GetChildren()) do local character = player.Character torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso") end)
I'm not sure what you're trying to do exactly as your question is very vague. The script I just made will loop through the players, get each and every one of their torso's, and then you can apply the changes you want(I'm assuming that's why you want this) -- Anyways my guess of your intentions may be off, but you got an error for searching "player" under workspace. The name "Player" won't be under workspace, look for the player under the players folder and then link it to their character.
Try this:
local player = game.Players.LocalPlayer