Hello, I'm currently making a "drop money" gui, my issure right now is that when i create a IntValue within the "money" part, the intvalue doesn't change when i execute amount.Value = <value> Here's my code:
function spawnMoney(plr) if plr.Parent.Name == "Players" then print(plr.Name) local txt = game.Players:FindFirstChild(plr.Name).PlayerGui.MainGui.dropMoney.amnt local amnt = txt.Text local money = game.ReplicatedStorage.Money local dupe = money:Clone() local player = workspace:FindFirstChild(plr.Name) local pos = player.Head.Position dupe.Parent = workspace dupe.Position = pos local amount = Instance.new("IntValue", dupe) amount.Name = "Amount" amount.Value = txt:FindFirstChild("wrth").Value -- This is where im having issues print("Money amount set to ".. amount.Value) end end
Any help is appreciated!