Hey once again. I am trying to teleport a player using a GameScript. But I dont know how to find the Humanoid from the player.
Script:
local User1 = 5, 5
local User2 = 2, 7
local User3 = 1, 8
local User4 = 10, 18
local User5 = 6, 24
local User6 = 9, 33
local User7 = 7, 40
local User8 = 3, 43
local User9 = 4, 47
local User10 = 8, 55
local CurrentUsers
local MaximumUsers = 10
NumberOfChildren = #workspace.GameData.Player.InGame:GetChildren()
print(NumberOfChildren)
CurrentUsers = NumberOfChildren
local PlayerFolder = game.Workspace.GameData.Player.InGame:GetChildren()
local rand = Random.new()
local num = rand:NextInteger(1,#PlayerFolder)
local chosen = PlayerFolder[num]
local char = chosen.Character
char.HumanoidRootPart.CFrame = CFrame.new(21.069, 5.3, 38.099)

1 comment
Use FindFirstChild() to find the humanoid, then put the if statement if it is true or not