I am having trouble creating a whitelist/blacklist I’ve just been confusing myself. I think my conditions may be messed up. I want to make it also that if the character is whitelisted, but they are on the blacklist then the blacklist will override and return.
Whitelist = {player.Character.Parent.Parent},
Blacklist = {player.Character},
if prompt:FindFirstChild("Whitelist") then
for _,instance in pairs(prompt.Whitelist:GetChildren()) do
if character:IsDescendantOf(instance.Value) == false or character ~= instance.Value then
print(instance.Value)
return
end
end
end
if prompt:FindFirstChild("Blacklist") then
for _,instance in pairs(prompt.Blacklist:GetChildren()) do
if character:IsDescendantOf(instance.Value) == true or character == instance.Value then
print(instance.Value)
return
end
end
end
I’m seeing some issues in your code. First of all, in the “Whitelist” table, you’re putting player.Character.Parent.Parent, which is the game. As for your issue, a simple
if Whitelist[player.Character] then return end
inside the blacklist function should work. LMK if this works
You could just use a remote event and fire it to the client you want to hide it from. Then you can destroy it on the client when it receives the remote event.
Are you doing it on the client right now? Because if you want to completely hide the proximity prompt, there’s no other way than doing it from the client.