The maximum number of players in a server is 4 and I want a table that has a gun for each player so that they cannot take more than needed, but if there are less than 4 players in the game then I want it to only show that number of guns on the table
This is what I have gotten so far
local Players = game:GetService("Players")
local players = Players:GetPlayers()
local replicatedstorage = game.ReplicatedStorage
local clonegun = replicatedstorage.Gun:Clone()
local clonegun2 = replicatedstorage.Gun2:Clone()
local clonegun3 = replicatedstorage.Gun3:Clone()
local clonegun4 = replicatedstorage.Gun4:Clone()
if #players == 1 then
clonegun.Parent = game.Workspace
end
everytime I join the game there appears to be no guns anywhere in the workspace

5 comments
are all 4 guns the exact same?
yes
When you define players, it gets the table from that time, so it #players will stay zero until you update it. Also why do you need to wait for players to add the guns?
also the if statement only checks #players once. You should make a while loop to check it every second.
Hi i saw your comment check bedlow for an edited script to change position of your gun