F3X Private Area Scripting Help

So, I am trying to make it to where Building Tools are only able to work in a certain area and if you are on a certain team. I have looked everywhere, but I am unable to find anything on how to do this. I have modified my Security script in the btools to disallow public building, but my permission script keeps coming back with “Attempt to connect failed: Passed value is not a function.” Does anyone know what I need to do with the permission script to make this work?

My Permission Script:

   local module = {
	Permission = {
		Type = "Team";
		Team = function(plr)
			if plr.Team == "Blue Team" then
				print("allow")
				return true
			else
				return false
			end
		end;
	};
}

return module
1 Like

F3x has a build in feature.
it is not well documentated so here is a rundown

in the f3x script (tool.core.security)

local Permissions = Area:FindFirstChild '[Permissions]';

this searches for a module script named [Permissions] attached to a part, the size of the part determines the size of area

for _, Permission in pairs(Permissions) do
this parts checks if any of the permissions are true (so you only need one)

elseif Permission.Type == 'Team' then
type determines what kind of permission you want to set up

what you want is

local module = {
{['Type'] = 'Team';["Team"] = Teams.TeamName};}
return module
2 Likes

I updated the Permission script to this, but it still gives me the same error when trying to use btools in the area.

   local module = {
	{['Type'] = 'Team';["Team"] = Teams.Blue};}
return module
1 Like

throw a “Teams = game:GetService(“Teams”)” in there before the “local module={”
if that doens`t fix it then get a fresh f3x tool

Okay, so I did both of those things, and now when I try to use the btools in the zone, it says “Requested module experienced an error while loading.” It seems to be recognizing the zone now and the permissions, but it won’t allow me to use the btools.

1 Like