Okay so, I was working on a donating stats gui, i added the text boxes where you can enter the player's name that you want to donate to, your player name, and the amount you want to donate to the player, i also added a button that lets you donate below all the text boxes. And then when i finished working on the donate button, it just didn't show any errors and didn't even work
Donate button code:
function Donate()
local amount = script.Parent.Parent.Amount.Text
local plrName = script.Parent.Parent.Player.Text
local plr = game.Players:FindFirstChild(plrName)
local mplrName = script.Parent.Parent.MainPlayer.Text
local mplr = game.Players:FindFirstChild(mplrName)
if plr and mplr then
local s1 = plr.leaderstats.Silks
local s2 = mplr.leaderstats.Silks
if s2.Value >= amount then
s1.Value = s1.Value + amount
s2.Value = s2.Value - amount
end
end
end
script.Parent.MouseButton1Click:Connect(Donate)
Explorer: https://pasteboard.co/K8eWQU1.png

2 comments
i tried it but it didn't work, i even tried to tweak it a lil bit and it still didn't work. it also didn't display any messages in the output
sorry for the late response but it worked