I have made a script for my game that detects if the player is the owner of a reserved server, and if they are then it ranks them Mod, this works fine because it shows a popup from HD Admin saying “You have been ranked to mod”, but they do not have any mod commands.
Event.OnServerEvent:Connect(function(Player, Data)
if svrType == "ReservedServer" then
local playerToRank = Players:GetPlayerByUserId(Data)
if playerToRank and not AlreadyRanked then
AlreadyRanked = true
local rank = "Mod"
local rankType = "Server"
local hdMain = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain()
local hd = hdMain:GetModule("API")
local rankId = hd:GetRankId(rank)
hd:SetRank(playerToRank, rankId, rankType)
end
end
end)
Are you sure the remote is being fired with the correct arguments and are you sure hd:SetRank(...) is being called with the correct parameters?
Edit:PathToRemote:FireServer(game.Players.LocalPlayer.UserId) should be way the remote is being fired from the client. I don’t recommend ranking someone using client to server remotes without extensive security to prevent exploiters from firing it.