i want it to sell Fat in return for Coins but idk how
I see what game your making, an "Eat Junk and Get Fat" simulator, how original.
Anyways, You need to decide how much coins a player would get. An example would be fat / 2 would equal how many coins the player would get. So here would be the code:
--Event goes here local p = game.Players.LocalPlayer p.leaderstats.Coins.Value = p.leaderstats.Fat.Value / 2 --Again, replace 2 with any number. --end)
Make a new script with this code:
game.Players.PlayersAdded:Connect(function(plr) Instance.new("Folder",plr).Name = "leaderstats" Instance.new("IntValue",plr.leaderstats).Name = "Coins" Instance.new("IntValue",plr.leaderstats).Name = "Fat" end)
Happy Devolping! Vivilian9