Hello, so basically I'm lost and been trying to debug and figure out why this isn't working for the past like 4hrs. There is no error in the output, it is literally just not converting the "info" into coins like it's supposed to.
local mps = game:GetService("MarketplaceService");
local perks = require(game:GetService("ReplicatedStorage").PerksModule);
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players[hit.Parent.Name]
local petEquipped = player.PetFolder.CurrentlyEquipped.Value;
local info = player.leaderstats.Information.Value;
local coins = player.leaderstats.Coins.Value;
local double = player.ProductsFolder.DoubleSell.Value;
local vip = player.ProductsFolder.VIP.Value;
local premium = player.ProductsFolder.Premium.Value;
if info > 0 then
if petEquipped ~= "" then
if premium == true and double == true and vip == true then
coins += ((info * 4) * perks[petEquipped].coinMultiplier);
info -= info;
elseif premium == true and double == true then
coins += ((info * 2.5) * perks[petEquipped].coinMultiplier);
info -= info;
elseif premium == true and vip == true then
coins += ((info * 2) * perks[petEquipped].coinMultiplier);
info -= info;
elseif double == true and vip == true then
coins += ((info * 3.5) * perks[petEquipped].coinMultiplier);
info -= info;
elseif double == true then
coins += ((info * 2) * perks[petEquipped].coinMultiplier);
info -= info;
elseif vip == true then
coins += ((info * 1.5) * perks[petEquipped].coinMultiplier);
info -= info;
else
coins += info * perks[petEquipped].coinMultiplier;
info -= info;
end
else
if premium == true and double == true and vip == true then
coins += (info * 4);
info -= info;
elseif premium == true and double == true then
coins += (info * 2.5);
info -= info;
elseif premium == true and vip == true then
coins += (info * 2);
info -= info;
elseif double == true and vip == true then
coins += (info * 3.5);
info -= info;
elseif double == true then
coins += (info * 2);
info -= info;
elseif vip == true then
coins += (info * 1.5);
info -= info;
else
coins += info;
info -= info;
end
end
end
end
end)

2 comments
is info a string?
No Info is a IntValue