How can I store permission values for each team using the properties tab?

Hello. For my SCP game, I created a Menu that checks if the player is in a specific team and got a specific rank, so that he can join. I stored that information using the properties in the Teams folder. The problem is now, for my Beta (while testing the game) I hadn’t all groups done, so I just set everything on one group. But now, all groups are done, and I saw that if I am changing the property to something different, all the others change. So basically, if I try to change if for a specific team, it changes for all the others.

Does anyone knows how I can stop that from happening?

2 Likes

Can you show us the script that manages the ranks? (if there is one)
If not, then can you maybe provide us with a recording of what is happening?

Here is the part of the script, that checks for the values, I will make a video soon.


for i, teamsholds in pairs(game:GetService("Teams"):GetTeams()) do		
	local TheTeamFrame = TeamList.HolderList.TeamHolder:Clone()
	TheTeamFrame.Visible = true
	TheTeamFrame.Parent = TeamList
	TheTeamFrame.Name = teamsholds.Name
	TheTeamFrame.textly.Text = teamsholds.Name
	TheTeamFrame.TeamObject.Value = teamsholds
	TheTeamFrame.UIGradient.Color = teamsholds:GetAttribute("Color")

	TheTeamFrame.MouseButton1Click:Connect(function()
		SecondaryInterface.Logo.Image = "http://www.roblox.com/asset/?id=6893644029"
		if teamsholds:GetAttribute("GroupID") == 0 then
			game.ReplicatedStorage.MenuRemotes.TeamRemote:FireServer(teamsholds)
			delay(2,function()
				game.ReplicatedStorage.MenuRemotes.DeployPosition:FireServer(workspace["Spawn Locations"].DEFAULT.Spawns.Selectings.Selecting)

			end)
			TeamList:TweenPosition(UDim2.new(-1, 0,0, 330), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .75, true)
			wait(.75)
			TeamButton.Visible = true
			DeployButton.Visible = true
			SpawnLocationButton.Visible = true
		elseif Plr:GetRankInGroup(teamsholds:GetAttribute("GroupID")) >= teamsholds:GetAttribute("MinID") then
			game.ReplicatedStorage.MenuRemotes.TeamRemote:FireServer(teamsholds)
			delay(2,function()
				game.ReplicatedStorage.MenuRemotes.DeployPosition:FireServer(workspace["Spawn Locations"].DEFAULT.Spawns.Selectings.Selecting)

			end)
			TeamList:TweenPosition(UDim2.new(-1, 0,0, 330), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .75, true)
			wait(.75)
			TeamButton.Visible = true
			DeployButton.Visible = true
			SpawnLocationButton.Visible = true
		end
	end)

	TheTeamFrame.MouseEnter:Connect(function()
		local Textly = TheTeamFrame:FindFirstChildWhichIsA("TextLabel")
		if Textly then
			game:GetService("TweenService"):Create(Textly, TweenInfo.new(.07, Enum.EasingStyle.Quad), {TextColor3 = Color3.fromRGB(255, 214, 110)}):Play()
		end
	end)

	TheTeamFrame.MouseLeave:Connect(function()
		local Textly = TheTeamFrame:FindFirstChildWhichIsA("TextLabel")
		if Textly then
			game:GetService("TweenService"):Create(Textly, TweenInfo.new(.02, Enum.EasingStyle.Quad), {TextColor3 = Color3.fromRGB(255, 255, 255)}):Play()
		end
	end)

end

end

function ListSpawns()

for _,ew in pairs(SpawnLocatList:GetChildren()) do
	if ew:IsA("TextButton") then
		ew:Destroy()
	end
end



for i, spawnholds in pairs(workspace["Spawn Locations"]:GetChildren()) do	

	-- Verification

	local AvailableTeam = spawnholds:FindFirstChild("AvailableTeams")

	local ValidTeam = AvailableTeam:FindFirstChild(Plr.Team.Name) 


	if ValidTeam and ValidTeam:GetAttribute("Available") == true and Plr:GetRankInGroup(ValidTeam:GetAttribute("GroupID")) >= ValidTeam:GetAttribute("MinRank") or spawnholds.Name == "DEFAULT" then
		local TheLocationFrame = SpawnLocatList.HolderList.LocationHolder:Clone()
		TheLocationFrame.Visible = true
		TheLocationFrame.Parent = SpawnLocatList
		TheLocationFrame.Name = spawnholds.Name
		TheLocationFrame.textly.Text = spawnholds.Name
		TheLocationFrame.Folder.Value = spawnholds


		TheLocationFrame.MouseButton1Click:Connect(function()
			SecondaryInterface.Logo.Image = "http://www.roblox.com/asset/?id=6893644029"

			SpawnLocation.Value = TheLocationFrame.Folder.Value
			SpawnLocatList:TweenPosition(UDim2.new(-1, 0,0, 330), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .75, true)
			wait(.75)
			TeamButton.Visible = true
			DeployButton.Visible = true
			SpawnLocationButton.Visible = true

		end)

I uploaded a video to the question.

Can you try doing it with values instead of attributes

Is there a piece of code that changes the team attributes?
Like

team.Attribute1 = "hello world"

No, I checked the code twice, but there isnt anything.

I could but then I would have to remake the whole script. And it already worked with atributes before, but now it does not work anymore, and I dont know why.

When you recorded the video, was the game running or not?

No, the game was not running. I just had the studio open.

Have you tried restarting Roblox Studio?

1 Like

Thank you, I guess xD
It is working now!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.