So basically, I am creating a modulescript, that contains a table. When countdown goes to 0, all players should be inserted to the table, then when i click the button, it should print the names of the player in the table, but i get nothing printed
This is the script that Player Get Inserted to the table
local playersPlaying = require(game.ReplicatedStorage.playersPlaying)
for i,v in pairs(game.Players:GetChildren()) do
table.insert(playersPlaying, v)
print("Player: "..v.Name.." joined in the game!")
v.Character.HumanoidRootPart.CFrame = GamePosition
end
This is a TextButton, where you click it, it should print player's name but nothing prints
local playersPlaying = require(game.ServerScriptService.playersPlaying)
script.Parent.MouseButton1Click:Connect(function()
for i, v in ipairs(playersPlaying) do
print("Checking")
print(v.Name)
end
end)

1 comment
On line 1 of the textbutton script, did you mean ReplicatedStorage?