Not adding the "creator" to the ModuleScript

  1. What do you want to achieve? I’m making a blockate-type game with permissions also, but it’s not adding the creator to the “Perms” ModuleScript

  2. What is the issue? It’s not adding the creator of the place to the perms ModuleScript, using CreatorId and UserId.
    image

  3. What solutions have you tried so far? I couldn’t find any.

local permissions = {
	["simo066u"] = 5, -- Game Admin
	["Include_Viable"] = 4, -- Game Moderator
}

game.Players.PlayerAdded:Connect(function(player)
	if not table.find(permissions, player) then
		if player.UserId ~= game.CreatorId then
			local insertedItem = table.insert(permissions, player.Name)
			insertedItem = 0 -- Visitor
		elseif player.UserId == game.CreatorId then
			local insertedItem = table.insert(permissions, player.Name)
			insertedItem = 3 -- World Creator
		end
	end
	for _, v in pairs(permissions) do
		print(v)
	end
end)

return permissions

(also not seeming to print anything?)

on line 7, it says “table.find(permissions, player)”, did you mean “(permissions, player.Name)”?
and i also tried the code, it worked fine for me.

1 Like