I am trying to make some of my friends and I whitelisted to a command that refreshes your character; Problem is, when I try to use the command, it does not work at all; Even though my name is in the whitelisted table.
Here’s the Local Script:
local whitelistedPeople = {"hasoco","zjkaleemsecondAlt","Player1","Player2","BuiIdYourCreation","Thunder_Alex12"}
plr.Chatted:Connect(function(msg)
local sp = string.split(msg," ")
if whitelistedPeople[plr.Name] then
if ARGS[1] == sp[1] then
print("Prefix chatted.")
if ARGS[2] == sp[2] then
print("2/3 command.")
if sp[3] then
local tplr = game.Players[sp[3]]
if tplr then
RefreshEvent:FireServer(sp[3])
end
end
end
end
end
end)
local whitelistedPeople = {"hasoco","zjkaleemsecondAlt","Player1","Player2","BuiIdYourCreation","Thunder_Alex12"}
plr.Chatted:Connect(function(msg)
local sp = string.split(msg," ")
if table.find(whitelistedPeople, plr.Name) then
if ARGS[1] == sp[1] then
print("Prefix chatted.")
if ARGS[2] == sp[2] then
print("2/3 command.")
if sp[3] then
local tplr = game.Players[sp[3]]
if tplr then
RefreshEvent:FireServer(sp[3])
end
end
end
end
end
end)