Hi thank you for reading this I appreciate your help any help because i am stuck in something every player has a game tag and if that game tag is true that player can mine but if it'S false they will not be able to mine here is the code for setting the game tag

this code is in the serverscriptservise.

for i,players in pairs(plrs) do
		local character=players.Character or players.CharacterAdded:Wait()
		if character then
			
			builder.Value=true
			builder.Parent=character
			print("i am allowed")
		else 
			
			if not players then
				builder.Value=true
				builder.Parent=character	
				table.remove(plrs,i)
				print("removed")
			end

		end

and here the script I check on if they builder tag is true i serverscript is in the map that the player mines in al players get teleporter to their mining surface and in that surface i check this.

if (builder and builder.Value)then 
     --code
end

and this works fine when I play this alone but when i test this with 3 players then only 1 player can mine and all others can not please if u know how to solve my problem then answer it thank u for taking the time reading.

2 comments

0

Is that the whole code in your first provided script? You're missing some things/haven't defined them from what I can see, but I'm not sure if you just copy and pasted part of the code here.

0

yes but that is the importent code