Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Firing a function if your player name is in a table does not work. Can you help me please?

Asked by 4 years ago
Edited 4 years ago

This question has been solved by the original poster.

I fire this code when a player joins the game:

local blacklisted_people = {
    "xxMVG_Fan8xxALT"
}

game.Players.PlayerAdded:Connect(function(player)
    for i,v in pairs(blacklisted_people) do
        if v == player.Name then
        game.ReplicatedStorage.SmoothShutdown.Blacklist:FireClient(player)
        end
    end
end)

and then, nothing happens, when I pick it up.

game.ReplicatedStorage.SmoothShutdown.Blacklist.OnClientEvent:Connect(function()
    script.Parent.Reboot.Visible = false
end)

[THIS HAS BEEN FIXED by making the submit button unvisible.]

0
are you suppose to make Reboot visible or not? TheBigBro122 427 — 4y
0
The Reboot Frame, where you can set the time, should not be visible xxMVG_Fan8xxALT 1 — 4y
0
I mean, it should not be to people which are in that list called blacklisted_people xxMVG_Fan8xxALT 1 — 4y
0
try putting print("Test") in that if statement to see if runs the code. TheBigBro122 427 — 4y
View all comments (3 more)
0
It runs, but the frame does not disappear xxMVG_Fan8xxALT 1 — 4y
0
I don't know why, but I used the same code as you have and it worked for me. Do you have errors? or maybe even scripts that make the Frame visible again? TheBigBro122 427 — 4y
0
Thank you for helping :) xxMVG_Fan8xxALT 1 — 4y

Answer this question