I have a server script with the list of players on the server ParticipantList. I'm trying to see if the script can find the name of the player from the list. The problem is that it can't. And I've used a print above this code to check that It's definitely in the list and in the game's players.
ParticipantList is a list of all Player Names that have a BoolValue in their Backpack marked as true.
local MaxLocations = Participants--Number of Players
local MaxLocationsList = {}
for i = 1,MaxLocations do
print("lets get it boys startup time")
local RandomLocation = math.random(1,MaxLocations)
local ParticipantHasntLeftYetCheck = game.Players:FindFirstChild(ParticipantList[i])
local Locations = workspace.Locations
print(ParticipantList[i])
if ParticipantHasntLeftYetCheck then--Problem is here. Can't find Player.
print("HES IN BOYS")
local Boat = game.ServerStorage.Boat:Clone()
Boat.Parent = workspace
Boat:MoveTo(Locations['Location_'..RandomLocation].Position + Vector3.new(0,10,0))
game.Players[ParticipantList[i]].Character.HumanoidRootPart.CFrame = CFrame.new(Locations['Location_'..RandomLocation].Position + Vector3.new(0,15,0))
else
print("He aint in boys.")
end
end
prints are there in order for me to debug. I'm testing this game by myself and so I should be the only person in ParticipantList.

1 comment
You Can Use WaitForChild()?