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

Core Message Not Showing Up?

Asked by 5 years ago

I am creating a message that pops up if you're blacklisted from this game. The message will not show tho. I don't know why; That's why I am asking. -duh-

LocalScript:

local Blacklist = {"suspectshot108"} -- TEST
local FriendList = {} -- People that if blacklist, can still enter game.
local Player = game.Players.LocalPlayer

-- Functions:
local Bind = Instance.new("BindableFunction",game.ReplicatedStorage)
Bind.Name = "Ignore_function"
local function CallServer(text)
    if text == "Yes" then
        for _,v in pairs(FriendList) do
            if string.match(Player.Name,v) then
                Player.Character.Humanoid.WalkSpeed = 16
            else
                Player:Kick("Server denied.")
    end
        end
    else
        if text == "No" then
            Player:Kick("I don't care either.")
        end
    end
end

Bind.OnInvoke = CallServer

game.Players.PlayerAdded:Connect(function(Plr)
    for _,v in pairs(Blacklist) do
        if string.match(Plr.Name,v) then
            game:GetService("StarterGui"):SetCore("SendNotifaction", {
              Title = "Moderation";
              Text = "The developers have blacklisted you from this game, try to enter?";
              Icon = "";
              Duration = 8;
              Callback = Bind;
              Button1 = "Yes";
              Button2 = "No";   
            })
        end
    end
end)
1
PlayerAdded will not fire for the client the local script is running on. do this server sided with remotes User#24403 69 — 5y
0
u cant kick ppl on the client, only urself User#23365 30 — 5y
0
Yes, I see that problem too. I will use remote functions. namespace25 594 — 5y

Answer this question