In the script below, how would you be able to match the house ID in the variables to the actual player?

I want the player to be matched with their house ID, and then I want local id to change the that players number, for example, wattlemanHouse is 1842, I want local id to come up 1842 and wattleman be linked with wattlemanHouse.

--Made by wattleman

--------------------------------------------------------
---------------Variables | Edit Below-------------------
--------------------------------------------------------

names = {"wattleman","Player1","SheriffOhiostatefan"}

wattlemanHouse = 1842
Player1House = 1842
SheriffOhiostatefanHouse = 0801

--------------------------------------------------------
------------DO NOT EDIT BELOW THIS LINE!----------------
--------------------------------------------------------
HC2 = script.Parent
NoHouse2 = HC2.NoHouse
controls = HC2.moreOptions


game.Players.PlayerAdded:connect(function(pName)
	for i,v in pairs(names) do
		if pName.Name == v then
			local id = 0
				NoHouse2.Visible = false
				controls.Visible = true
		else
			NoHouse2.Visible = true
			controls.Visible = false
		end
	end
end)



4 comments

1

I have no idea what you mean.

0

I need it to find you name, (pName) and find the variable with your name in it, with the word house at the end.

1

Still don't understand. Why would you need to find a specific variable? After all, you created them. On top of that, you would never be able to create a variable for every person on roblox's username.

0

It wont be for ever person on ROBLOX.