So I am making a Tycoon and I am adding perks that adds stats like Cash, Health, and Speed but I am having a problem. My Cash Dev product script works fine that isn't the problem its the one that adds speed. So when it is bought it gives you the selected amount of speed and when you die it is gone which is how I wanted it. But when I rejoined I quickly noticed that you get all of the speed that you payed for back which is practically really frustrating considering I CANT fix it at all.People have told me to use Bool value but in that aspect I am very lost and dont get it. Another guy said that the game is thinking that they are buying it again so it gives them the speed again and to add a Bool value. I ask them how I would do this but they explain it and I dont get it. It seems to short and not well said on how to do it... I am in deer need for a solution! Please help if you can!
Here is my script for the speed just in case it is needed:
local developerProduct = 20433249 local speedInc = 15
Game:GetService("MarketplaceService").ProcessReceipt = function(receipt)
if receipt.ProductId == developerProduct then
for i,v in pairs(game.Players:GetPlayers()) do
if v.userId == receipt.PlayerId then
if v.Character and v.Character:FindFirstChild("Humanoid") then
v.Character.Humanoid.WalkSpeed = v.Character.Humanoid.WalkSpeed + speedInc
end
end
end
end
end

2 comments
The block of code on its own shouldn't be causing your issue. Can you post your PlayerAdded function? That's where I would think to look for the error first.
What is a PlayerAdded function? I dont think I have one.. Sorry if I sound stupid I am a basic scripter and I will ask a lot of questions