Hello, I want to know how to fix this, i started using FireClient on remote events since i only used FireServer, i want to know the correct way on how to use them, here is a script i made but i keep getting an error, here is the script
Script
–[[
RANK: 1, Player
RANK: 2, VIP
RANK: 3, Mod
RANK: 4, Admin
RANK: 5, Creator
–]]
local ControlRanks = {
Rank3 = {1454922591};
Rank4 = {};
Rank5 = {};
}
-- Remotes
local ClientRanks = game.ReplicatedStorage.ClientRanks
game.Players.PlayerAdded:Connect(function(player)
for i,v in pairs(ControlRanks.Rank3) do
if player.UserId == v then
--// Moderator Permissions
player.Chatted:Connect(function(msg)
if msg:sub(1,6) == ".rank " then
local Target = game.Players:FindFirstChild(msg:sub(7))
if not Target then
warn("Invalid Target")
end
if Target then
ClientRanks:FireClient(player,Target)
end
end
end)
end
end
end)
LocalScript
local ClientRanks = game.ReplicatedStorage.ClientRanks
ClientRanks.OnClientEvent:Connect(function(Plr,Target)
print(Target.Name)
end)