I'm experimenting with Local Parts but I've come across a problem, when I test with Player1 and have that name in permissions it runs both parts of the script even the part after
elseif Player.Name ~= v then
so if I'm in the list It creates both parts, if I'm not it only creates the second part after
elseif Player.Name ~= v then
I don't know why this is, please help me! This is my script:
local bin = game.Workspace:FindFirstChild("LocalBin")
Permission = {"Player1","UndiscoveredLimited"}
Player = game.Players.LocalPlayer
if bin == nil then
bin = Instance.new("Camera")
bin.Name = "LocalBin"
bin.Parent = game.Workspace
end
for i=1,#Permission do
if Player.Name == Permission[i] then
part1 = Instance.new("Part",bin)
part1.FormFactor = "Custom"
part1.Size = Vector3.new(1,2,2)
part1.Position = Vector3.new(6,5,5)
part1.Anchored = true
elseif Player.Name ~= Permission[i] then
part1 = Instance.new("Part",bin)
part1.FormFactor = "Custom"
part1.Size = Vector3.new(1,6,2)
part1.Position = Vector3.new(3,10,1)
part1.Anchored = true
end
end
