FIX: Please change the updatePlayerDonoAmount function in DonationModule to: ----------------------------------------------------------------------------------------- function module.updatePlayerDonoAmount(userId, amount)
local success, currentAmount = pcall(function() return donationStore:GetAsync(userId) end)
if currentAmount then currentAmount += amount else currentAmount = amount end
I noticed that the nameCache part disappears after some part of the video. My board didnt work, is it because of that change? Edit: I actually found the mistake i made but it still gives an error that says unable to cast string to int64 in the "local player = game.Players:GetPlayerByUserId(playerId)" part in donation module
Maybe I can use this as a same thing to make a Kills leaderboard just like TSB and connect the leaderboard to the players kills leaderstats idk if it work guess I shal try in another day
Hey there, this tutorial doesnt seem to make my Donation Board work. I´ve noticed you do some transitions and the code changes when you those transitions happen. Would you be able to share the code publicly or update this tutorial? Thanks
@@ployfrogroblox It would be cool if you redo this video because it seems like I did everything right but the board doesn't work, I keep buying the donations but it still doesn't work.. I'm kinda sad because I spent many hours trying to do your donations board
I just turned my donating part into a gui, except I did get a problem that is when a player presses the button, but then just cancels rather than buying, then the board still adds the number... idk how to fix it tho EDIT: I fixed it by changing a script a bit
hey man, I did everything you did, but it doesn't clone the donator frame for some reason. Could you please make a pastebin with all of the scripts in it? I would really appreciate it!
i have a problem, when i try to klick on the donation buttons, nothing appears. I've started over 3 times, enabled studio access to API services and followed the script correctly. I have no idea what the problem might be?
Hi mate, I've done everything you have. I got no script errors and the only problem I got is that I can't see the player's rank, image, username and donations
Hello, sorry for the late reply but I may need help. For some reason, instead of when you donate it shows, you can just click the buttons and it will show that you've donated, please help me fix this.
Change the dev product purchase script to: local marketplaceService = game:GetService("MarketplaceService") local donationModule = require(script.Parent) local donationProducts = { [YourId] = 1, -- change the amounts to whatever [YourId] = 5 } local function proccessReceipt(receiptInfo) local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then -- They probably left a game, if they come back then the callback will be called again return Enum.ProductPurchaseDecision.NotProcessedYet end
if player and donationProducts[receiptInfo.ProductId] then -- What do you want devProduct to do
local price = donationProducts[receiptInfo.ProductId] donationModule.updatePlayerDonationAmount(receiptInfo.PlayerId, price) end
return Enum.ProductPurchaseDecision.PurchaseGranted end marketplaceService.ProcessReceipt = proccessReceipt
Just got finished and had a couple typos and errors but when I went into the game I noticed that clicking the donation buttons and then clicking cancel purchase makes the robux on the leaderboard go up anyways. No errors in my code and im sure I followed everything. Is there something to fix this?
It works I just have one problem, when I do the test donate thing the bar where its suppose to show the username and amount and what not isnt on the leaderboard and its just blank. Someone help me pls
Heyy I need help with line 9 it says the problem is function onProductPromptPurchase and line 44 says there’s a problem on function setUpDonoBoard aswell as line 11 it says cleanUpLeaderboard and line 73 says function updatePlayerDonoAmount :)
@@ployfrogroblox yeah sorry for the late reply, i get an error in game it say's attempt to perform arithmetic (add) on nil and number the code for that line is currentAmount += amount
@@ployfrogroblox sorry for the late reply, it's now saying unable to cast string to int64 idk if u have any idea about that? if you need more info i can try give it
@@ztz8787 😩 Ill upload a model with the correct scripts to roblox later today and send you the link. Maybe Ill redo the video, I think I edited the video wrong. Thank you for letting me know
Mine dosent work : local DatastoreSevice = game:GetService("DataStoreService") local donationStore = DatastoreSevice:GetOrderedDataStore("DonationHolder") local module = {} local function cleanUpLeaderBoard()
for _,dono in pairs(game.Workspace.DonationBoard.SurfaceGui.Back.DonHolder.List:GetChildren()) do if dono:IsA("Frame") then dono:Destroy() end end
module.setUpDonoBoard()
end local nameCache = {} local function getPLRName(plrID) local nameFromCache = nameCache[plrID] if nameFromCache then return end local name local success, _ = pcall(function() name = game.Players:GetNameFromUserIdAsync(plrID) end) if success then nameCache[plrID] = name return name end return " " end function module.setUpDonoBoard() local isAscending = false local size = 50 --Amount Of People local pages = donationStore:GetSortedAsync(isAscending, size) local topFifty = pages:GetCurrentPage()
for rank, data in ipairs(topFifty) do local plrID = data.key local amount = data.value local plr = game.Players:GetPlayerByUserId(plrID) local username = getPLRName(plrID) local ThumbnailType = Enum.ThumbnailType.AvatarBust local ThumbnailSize = Enum.ThumbnailSize.Size420x420
local avaImage, isReady = game.Players:GetUserThumbnailAsync(plrID, ThumbnailType, ThumbnailSize) donoframe.PlayerImage.Image = avaImage
donoframe.LayoutOrder = rank
donoframe.Parent = game.Workspace.DonationBoard.SurfaceGui.Back.DonHolder.List end end function module.updatePlayerDonoAmount(userId, amount)-- if dosent work change player to plr :) -- might fix idk
local succsess, currentAmount = pcall(function() return donationStore:GetAsync(userId)
end)
if currentAmount then currentAmount += amount else currentAmount = amount end
bro finally someone explain how to script it not like other videos who will just say download model
frrr
i were looking for smth like this for long time cuz he is the only one that actually shows how to make one and not just download a free model
Bro please make more Roblox Content. It has so Potential. Its so amazing helping!!!
Thank you so much for this! I'm a small dev so far with 10k robux, and I don't know if I should invest on ads or not. It's getting some plays though
Thanks! Depends if you’re earning money back from advertising or not.
@@ployfrogroblox Yea my games been getting profit when I invest over time
@@kylebarvelwhats ur game
@@TratUsYT Ultimate Obby 2.0 (10k stage "Mega Fun Obby")
@@kylebarvel OMG UR THE DEV OF THAT I used to play the game all the time with my brother it’s so fun
thx for the tutorial, really helpfull
50th sub! 🎉
Thank you so much!
Thanks for your help, because all videos are a free model, I subed and liked so Im new
There are no People on my board
FIX: Please change the updatePlayerDonoAmount function in DonationModule to:
-----------------------------------------------------------------------------------------
function module.updatePlayerDonoAmount(userId, amount)
local success, currentAmount = pcall(function()
return donationStore:GetAsync(userId)
end)
if currentAmount then
currentAmount += amount
else
currentAmount = amount
end
donationStore:SetAsync(userId, currentAmount)
cleanUpLeaderBoard()
end
-----------------------------------------------------------------------------------------
you are an amazing channel
it still dose not work
no errors and it dosent work
the ModuleScript made me end up with 89 lines lolz
Brother you literally couldn’t be any faster with the speed up time 💀
tysm
I noticed that the nameCache part disappears after some part of the video. My board didnt work, is it because of that change?
Edit: I actually found the mistake i made but it still gives an error that says unable to cast string to int64 in the "local player = game.Players:GetPlayerByUserId(playerId)" part in donation module
Bro it's so confusing, You shouldn't speed up anything.
Tbh ur just bad it was ez
@@Claudiaxty that's rude, some people are slow readers.
Thank you very much! Will try it now:D
I had a bug so when a player presses a button and doesn't buy he appears on the donation board
Even if i cancle the donation it adds up ?
Ployfrog!
When I finished the scripting I don’t have my DonoBoard UI show up to show Rank, Username, And amount can you help
Maybe I can use this as a same thing to make a Kills leaderboard just like TSB and connect the leaderboard to the players kills leaderstats idk if it work guess I shal try in another day
Hey there, this tutorial doesnt seem to make my Donation Board work. I´ve noticed you do some transitions and the code changes when you those transitions happen. Would you be able to share the code publicly or update this tutorial? Thanks
does not work a single bit i have spent 3 and a half hours copying everything and i had no errors and is comepletley unusable and broken please help
send the code I'll try find the mistake
yall what is a rank now i cant find it
Hiya, Idk if you will read this or not but can you make the tutorial how to make the GUI only version. it'll be great and useful!
That’s a good idea:) i need to redo this video so might split it into two: GUI and Scripting
@@ployfrogroblox It would be cool if you redo this video because it seems like I did everything right but the board doesn't work, I keep buying the donations but it still doesn't work.. I'm kinda sad because I spent many hours trying to do your donations board
I just turned my donating part into a gui, except I did get a problem that is when a player presses the button, but then just cancels rather than buying, then the board still adds the number... idk how to fix it tho EDIT: I fixed it by changing a script a bit
broken, idk why worked before now it doesnt work now for some reason says unable to cast string to int64
hey man, I did everything you did, but it doesn't clone the donator frame for some reason. Could you please make a pastebin with all of the scripts in it? I would really appreciate it!
same.
ye same
You guys are so lazy you really want pastebin stuff?
same
Whats unable to cast string to int4, like what does that mean and how do i fix it?
i have a problem, when i try to klick on the donation buttons, nothing appears. I've started over 3 times, enabled studio access to API services and followed the script correctly. I have no idea what the problem might be?
yeah i have the same issue can u inform me when u find a solution
hello why don't you add this to toolbox
Pastebin brooooo please I had so many buuugs
Hi mate, I've done everything you have. I got no script errors and the only problem I got is that I can't see the player's rank, image, username and donations
i have the same issue
U can paste the scripts here and ill try to help you(put the script name above the script and put spaces between scripts so i can understand it)
@@amit6875i’m getting “unable to cast string to int64
yeah same
I have the same problem
what's "Unable to cast string to int64"? ive tried fixing it but i just wont work
did you fix it?
Hello, sorry for the late reply but I may need help. For some reason, instead of when you donate it shows, you can just click the buttons and it will show that you've donated, please help me fix this.
Change the dev product purchase script to:
local marketplaceService = game:GetService("MarketplaceService")
local donationModule = require(script.Parent)
local donationProducts = {
[YourId] = 1, -- change the amounts to whatever
[YourId] = 5
}
local function proccessReceipt(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
-- They probably left a game, if they come back then the callback will be called again
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if player and donationProducts[receiptInfo.ProductId] then
-- What do you want devProduct to do
local price = donationProducts[receiptInfo.ProductId]
donationModule.updatePlayerDonationAmount(receiptInfo.PlayerId, price)
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
marketplaceService.ProcessReceipt = proccessReceipt
@theflamingmustafa7852 thanks youuu so so much
Is there a way for me to edit the donation amount of a player? Such as making it so when I test in studio, I can just wipe the amount I "Donated"
why not use IncrementAsync over SetAsync?
Bruh I did this for 5 hours only to realice it doesn't work for some reason and it is gonna take a while to find why...
same
Just got finished and had a couple typos and errors but when I went into the game I noticed that clicking the donation buttons and then clicking cancel purchase makes the robux on the leaderboard go up anyways. No errors in my code and im sure I followed everything. Is there something to fix this?
yes, in DeveloperProductPurchase do this:
"if isPurchased then"
imagine waiting for 8 months
@@max29stive hey uhhh where to I place the "if isPurchased then"?
how do i reset
i have error can u help me
9:17
It works I just have one problem, when I do the test donate thing the bar where its suppose to show the username and amount and what not isnt on the leaderboard and its just blank. Someone help me pls
Unable to cast string to int64 - Server - DonationModule:44
pls help
local player = game.Players:GetPlayerByUserId(playerId)
Ployfrog how to fix unable to cast to int64 or send me the model i need it for my horror game dont worry i will put you on credits
Heyy I need help with line 9 it says the problem is function onProductPromptPurchase and line 44 says there’s a problem on function setUpDonoBoard aswell as line 11 it says cleanUpLeaderboard and line 73 says function updatePlayerDonoAmount :)
I’ll send the pastebin to show what I’m talking about :)
hello is it possible to put it in screen gui ?
yeah
25:21
12:32
Struggling to get this to work any chance u could help on discord or? everything looks the same but ain't working
Are you getting any errors?
@@ployfrogroblox yeah sorry for the late reply, i get an error in game it say's attempt to perform arithmetic (add) on nil and number
the code for that line is
currentAmount += amount
@@ztz8787 Change the function to:
function module.updatePlayerDonoAmount(userId, amount)
local success, currentAmount = pcall(function()
return donationStore:GetAsync(userId)
end)
if currentAmount then
currentAmount += amount
else
currentAmount = amount
end
donationStore:SetAsync(userId, currentAmount)
cleanUpLeaderBoard()
end
@@ployfrogroblox sorry for the late reply, it's now saying unable to cast string to int64 idk if u have any idea about that? if you need more info i can try give it
@@ztz8787 😩 Ill upload a model with the correct scripts to roblox later today and send you the link.
Maybe Ill redo the video, I think I edited the video wrong.
Thank you for letting me know
My buttons wont press. Please help.
have you fixed?
@@brayism yeah I decided to go with a model and redo the design and stuff
No ain't way, im not wasting 2 hours of my life time. You better have the free model on description which u don't.
Mine dosent work : local DatastoreSevice = game:GetService("DataStoreService")
local donationStore = DatastoreSevice:GetOrderedDataStore("DonationHolder")
local module = {}
local function cleanUpLeaderBoard()
for _,dono in pairs(game.Workspace.DonationBoard.SurfaceGui.Back.DonHolder.List:GetChildren()) do
if dono:IsA("Frame") then
dono:Destroy()
end
end
module.setUpDonoBoard()
end
local nameCache = {}
local function getPLRName(plrID)
local nameFromCache = nameCache[plrID]
if nameFromCache then
return
end
local name
local success, _ = pcall(function()
name = game.Players:GetNameFromUserIdAsync(plrID)
end)
if success then
nameCache[plrID] = name
return name
end
return " "
end
function module.setUpDonoBoard()
local isAscending = false
local size = 50 --Amount Of People
local pages = donationStore:GetSortedAsync(isAscending, size)
local topFifty = pages:GetCurrentPage()
for rank, data in ipairs(topFifty) do
local plrID = data.key
local amount = data.value
local plr = game.Players:GetPlayerByUserId(plrID)
local username = getPLRName(plrID)
local ThumbnailType = Enum.ThumbnailType.AvatarBust
local ThumbnailSize = Enum.ThumbnailSize.Size420x420
local donoframe = script.Donor:Clone()
donoframe.Place.Text = rank
donoframe.Amount.Text = amount
donoframe.Name.User.Text = username
local avaImage, isReady = game.Players:GetUserThumbnailAsync(plrID, ThumbnailType, ThumbnailSize)
donoframe.PlayerImage.Image = avaImage
donoframe.LayoutOrder = rank
donoframe.Parent = game.Workspace.DonationBoard.SurfaceGui.Back.DonHolder.List
end
end
function module.updatePlayerDonoAmount(userId, amount)-- if dosent work change player to plr :) -- might fix idk
local succsess, currentAmount = pcall(function()
return donationStore:GetAsync(userId)
end)
if currentAmount then
currentAmount += amount
else
currentAmount = amount
end
donationStore:SetAsync(userId, currentAmount)
cleanUpLeaderBoard()
end
return module
not sure if it was intentional, but donoframe.Name.User.Text may be invalid
@ployfrogroblox Mine dosent work and there are no errors