Scripting issue

Try to read the error, tell me what is happening?

I add a point, it should rank.

It then errors on the server side -

Unable to cast string to bool
Stack Begin

@cookie

Okay, can you explain to me what that means?

I think it means it can not send a bool value. As I said I am a basic scripter

Are there any other errors before this error?

Nope just this one. Others are the nametag

In addition to that, I want to say this script won’t even work that well.

No matter your rank, you will still get promoted to “x” rank if you have the certain amount of points.

This entire script won’t work, the best thing you can do is learn how to use datastore with this or wait for the new video to release.

If you guys find this out, I will be able to make the points ranking system. :>

What new video? Anyways,thanks for the help

Try this (probs wont work)

local Http = game:GetService("HttpService") 
local DiscordWebhook = ""

local GroupId = 8428801 
local url = "Application_URL"
local APIKEY = "API_KEY_HERE"
local plr = game.Players

local date = os.date("!*t") 


function rankUser(UserId,RoleId) -- Rank user function.
	Http:GetAsync(url.."?user_name="..plr.Name.."&key=".. APIKEY.."&groupid=" ..GroupId.."&role_number="..RoleId) -- Ranking them online.
end

game.Players.PlayerAdded:Connect(function(plr)

	local Minutes = plr:WaitForChild("leaderstats").Minutes -- Local leaderstat

	local Data = { -- Making A Rank Message
		["content"] = plr.Name.." ,was just ranked. | "..date.month.."/"..date.day.."/"..date.year
	}

	Data = Http:JSONEncode(Data)

	if plr:IsInGroup(GroupId) and plr:GetRankInGroup(GroupId) >= 1 then 

		Minutes.Changed:Connect(function()
			local RoleId 
			if Minutes.Value >= 100000 then 
				RoleId=4
				rankUser(plr.UserId,RoleId) 
				Http:PostAsync(DiscordWebhook, Data) 
			elseif Minutes.Value >= 10000 then 
				RoleId=3 
				rankUser(plr.UserId,RoleId)
				Http:PostAsync(DiscordWebhook, Data)
			elseif Minutes.Value >= 5000 then 
				RoleId=2
				rankUser(plr.UserId,RoleId) 
				Http:PostAsync(DiscordWebhook, Data) 
			end
		end)

	end

end)

Thanks ill give it a try whenever my wifi decides to load

lol. mkay! lmk if it does work, which it probs wont. lol

There is no Discord webhook here, perhaps that’s the issue?

Example of how it should look like, but with random numbers instead of an actual webhook;

local DiscordWebhook = "1234567890"

We’re talking about the ranking. :smiley:

This won’t work, here is the issue, like I said above there is nothing stopping people above the rank getting demoted.

I want to release a video properly going over this.


I suggest your better off scrapping this code & making a new script completely redesigned, as at the moment this script will not function to how you would like it to.

Say Timmy is rank 10, and has 100 points.

When Timmy joins the server the script will go: Oh! Timmy has more than 50 points! Let’s promote him to rank 9!

Even though Timmy is rank 10, he is getting promoted because the server can see he has enough points.

I know I removed the webhook so ya aint abusing it

Might be worth reading @Toznee_Roblox

Yeah, I was planning on patching that with

if Player:GetRankInGroup(5344349) >= 8 then
if Minutes.Value >= 100000 then
RoleId=4
rankUser(plr.UserId,RoleId)
Http:PostAsync(DiscordWebhook, Data)

Any idea on when ya vid will be out?

Yeah did not work sadly