Hello there! I was working on the Rank Management Center and I changed it so it works with a T-Shirt, but it doesn’t rank. Heroku is set up properly because it works with the AC. Help?
My first question is, why a T-shirt?
and second, you are best off using a gamepass.
If you have a T-shirt on sale before you got you’re rank management center then it’s just faster. I feel like that was not necessary to ask.
It was necessary to ask and please don’t try to control what I ask. It’s easier to use a game-pass because you’re not paying anything to get it on-sale unlike you shirts you have to pay to get them on-sale so it’s not worth it.
It’s worth using a game-pass because you pay 0 robux to get it on sale, rather than paying 10 robux to get a shirt on-sale.
I already have them bought, but I am using them because airlines usually use t-shirts.
Like what I said
If you have a T-shirt on sale before you got you’re rank management center then it’s just faster.
Just like @HayHay just said.
But what I’m saying it’s easier for gamepassess. They are easier to use and what if you want more ranks? You’re stuck there if you have no robux.
I am using it for Business Class, First Class, and Investor. Like SPA does.
Plus, for J-Techs products, they use T-Shirts for the check-in/self check-in.
The script isn’t right then, that’s why it’s not working,
It should be PromtPurchase
not PromptGamePassPurchase
I did. Ill show you both of the scripts.
Scripts:
ServerScript:
local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game.ReplicatedStorage.Requests
local HttpService = game:GetService("HttpService")
local ReqRank = ReplicatedStorage.ReqRank
local url = "https://bahamas-airline-rank-api.herokuapp.com/group/rank/"
local APIKEY = "gfqywhuyt613fhyuj8w67yrrrrrrrrrrrh3uwygfr6t7hyu6t78yu8976tu8ygh796878968ty7u87y6u"
local groupId = 8873606
local GameID = 6299647938
ReqRank.OnServerEvent:Connect(function(plr, Shirt_Id, role_number)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr.UserId, Shirt_Id) then
print("User owns gamepass! Now ranking!")
local url_with_data = url.."?user_name="..plr.Name.."&key=".. APIKEY.."&groupid=" ..groupId.."&role_number="..role_number
local response = HttpService:GetAsync(url_with_data)
local data = HttpService:JSONDecode(response)
if data == "The user had their ranked changed" then
plr:Kick("You were ranked in the group!")
else
ReplicatedStorage.InfoOnRank:FireClient("Something went wrong on our end! Try again later, if the issue still persists contact the game owner.")
plr:Kick("Something went wrong on our end! Try again later, if the issue still persists contact the game owner.")
print("An error occured.")
end
else
ReplicatedStorage.InfoOnRank:FireClient("You do not own the gamepass!")
end
end)
ScriptManager:
local plr = game.Players.LocalPlayer
local button = script.Parent
local count = 0
local threshHold = 2
local clickTime = 0.5
local Shirt_Id = 6260470020
local rank_id = 12
local rank_name = "Business Class - 500 RBX"
script.Parent.Parent.RankName.Text = rank_name
local MarketPlaceService = game:GetService("MarketplaceService")
function Click()
count += 1
if count % threshHold == 0 then
game.ReplicatedStorage.Requests.ReqRank:FireServer(Shirt_Id, rank_id)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr, Shirt_Id) then
script.Parent.Parent.RankName.Text = "Ranking..."
end
else
if count % threshHold == 1 then
MarketPlaceService:PromptPurchase(game.Players.LocalPlayer, Shirt_Id)
end
end
wait(clickTime)
count -= 1
end
button.MouseButton1Click:Connect(Click)
button.TouchTap:Connect(Click)
Use a gamepass for it to work, there is an error in the script.
I’ll work on the scripts when I get a chance.
I think I found the error. I used plr.userid.
I found the error! I used plr.UserId
thanks for the help!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.