Hi! So I was making a admin panel for my game, and I had a problem recently.
I'm planning to make it when you clicked the button it will detect what stat you want and it will change that stat for you but it didn't work, I checked output and there is no errors.
Problem: The stat value didn't change but it will print("Clicked!") when mouse button 1 is clicked
This is the script code:
local plr = script.Parent.Parent.Parent
local Button = script.Parent.Panel.Buttons.Cash
local arg1 = Button.Textbox1.Text
Button.MouseButton1Click:Connect(function()
print("Clicked!")
if arg1 == "Cash" then
plr.Stats.Cash.Value = Button.Value.Value
print("Works")
elseif arg1 == "Multiplier" then
plr.Stats.Multiplier.Value = Button.Value.Value
print("Works")
elseif arg1 == "Rebirth" then
plr.Stats.Rebirth.Value = Button.Value.Value
print("Works")
elseif arg1 == "UltraRebirth" then
plr.Stats.UltraRebirth.Value = Button.Value.Value
print("Works")
elseif arg1 == "Prestige" then
plr.Stats.Prestige.Value = Button.Value.Value
print("Works")
elseif arg1 == "SuperPrestige" then
plr.Stats.SuperPrestige.Value = Button.Value.Value
print("Works")
elseif arg1 == "HyperPrestige" then
plr.Stats.HyperPrestige.Value = Button.Value.Value
print("Works")
elseif arg1 == "UltraPrestige" then
plr.Stats.UltraPrestige.Value = Button.Value.Value
print("Works")
elseif arg1 == "OmgegaPrestige" then
plr.Stats.OmegaPrestige.Value = Button.Value.Value
print("Works")
elseif arg1 == "Sacrifice" then
plr.Stats.Sacrifice.Value = Button.Value.Value
print("Works")
elseif arg1 == "HugeSacrifice" then
plr.Stats.HugeSacrifice.Value = Button.Value.Value
print("Works")
elseif arg1 == "ULT" then
plr.Stats.ULT.Value = Button.Value.Value
print("Works")
end
end)
If you can help me with this problem, thanks alot!

2 comments
Special thanks to you for helping me to solve this issue!
np