Hi.
Im creating a give-script. I get the player name from a command:
local ciplr = string.sub(msg, 10, -4)
Now if i try to clone an object into the Inventory of the player, it says:
OKRPLAY is not a valid Member of Players
im using this code:
local ticket = game.ServerStorage.FirstClass:Clone()
ticket.Parent = game.Players[ciplr].Backpack
Is it possible to convert the string to a player object?

3 comments
The string is right, i printed it. But i cant find the Player OBJECT, because ciplr is a string.
then try game.Players:FindFirstChild(ciplr).Backpack
Thank you, my problem was: local ciplr = string.sub(msg, 10, -5) ----- Needed to be -5 instead of -4