What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried doing else, else if etc and even using a table.
local Open = script.Parent
local AdminUI = script.Parent.Parent
local Pass = AdminUI.Pass
game.Players.PlayerAdded:Connect(function(plr)
Open.MouseButton1Click:Connect(function()
Pass.Visible = true
elseif plr.Name == "achdef" then
Pass.Visible = false
print("debugging")
end
end)
end
elseif or else can not be used without an if statement, like i mentioned in your previous topic as well. I’d suggest you to take a look at the conditional structures in Luau.
Reference link: Control Structures | Documentation - Roblox Creator Hub
A PlayerAdded event is unnecessary, you can just use MouseButton1Click
local Player = game:GetService('Players').LocalPlayer
Open.MouseButton1Click:Connect(function()
if Player.Name == 'achdef' then
Pass.Visible = false
else
Pass.Visible = true
end
end)