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 = 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!

7 comments
Hey man, could you reformat your code using the lua code blocks and better indentation? This is really hard to read!
Sure, ill see if i can lol
Well, it seems like it can’t find “wrth” in the path. What are you using as the arg for “plr” when calling the function?
Heres the rbxl file for you to have a look at https://www.dropbox.com/s/kjpfydxndk6sx32/DarkRP.rbxl?dl=0
Bump, any help?
Is this script being run from the client or the server?
I've included a rbxl file for you to take a look at, the script is being fired from a remoteevent (due to cloning parts from ReplicatedStorage to workspace, the "wrth" value is a IntValue within the player's GUI (which i get the players name from on line 1 and 2 (print(plr.Name) prints the users name). All is working fine besides when i try to change the IntValue "Amount" that is being created