-
What do you want to achieve?
Im making a round system for my game, and when a round starts, i want to teleport them to a block, and for that i need to be finding the HumanoidRootPart, and for that i need to get the Character, and i cant seem to get it from the PlayersService -
What is the issue? Include screenshots / videos if possible!
I cant find a way to get the character -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked in some posts but their scripts were all different from mines.
To make this easier, here is the uncompleted version of my round system, i added a comment on the function i need help with
local lobbytp = game.Workspace.lobby
local rallytp = game.Workspace.lobby
local plrs = game:GetService("Players")
local function countPlayers()
local req = 1 -- amount of required plrs to start
_G.signal = false
if #plrs:GetChildren() >= req then -- if there is more than 2 plrs, send signal telling to start
_G.signal = true
end
--[[if #plrs:GetChildren() < req then
_G.signal = false
end]]
end
wait(10)
countPlayers()
print(_G.signal)
local function RoundStart()
if _G.signal == true then
for amount, item in pairs(plrs:GetChildren()) do
local gui = item:WaitForChild("PlayerGui")
local label = gui.TopLabel.TextLabel
local IntTime = 30
for i = 1, 30 do
IntTime = IntTime - 1
label.Text = "Starting in " ..IntTime
wait(1)
end
if IntTime == 0 then
label.Text = "Starting the game... "
wait(1)
end
end
else
for amount, item in pairs(plrs:GetChildren()) do
local gui = item:WaitForChild("PlayerGui")
local label = gui.TopLabel.TextLabel
label.Text = "Need more players to start (2 minimum)"
end
end
end
local function TP()
local plrs2 = plrs:GetChildren()
local character = plrs.CharacterAdded-- i cant figure out this part
end
coroutine.wrap(RoundStart)