game.ReplicatedStorage["admin money"].OnServerEvent:Connect(function(player,target,money)
--if player.PlayerGui.rank:FindFirstChild("admin gui") then
print(target)
target:WaitForChild("leaderstats").Money.Value = money
--end
end)
ServerScriptService.admin:73: attempt to call method 'WaitForChild' (a nil value) without waitforchild i got ServerScriptService.admin:73: attempt to index local 'leaderstats' (a nil value)
prints: world_kiIIer
local script since it seems like to be needed (should not be needed)
local player = script.Parent.Parent.player
local money = script.Parent.Parent.amount
script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(game.Players:GetChildren()) do
if v.Name:match(player.Text) then
game.ReplicatedStorage["admin money"]:FireServer(v.Name,money.Text)
end
end
end)

5 comments
Why does it print world_killer? Is that he player's name or something?
yes its the player name, the money print can only be a number
What do you fire to the server? If target isn't a player object, you need to make it one.
target is a player object
v.Name is a string, not the player object... It's like doing: x = "hello" x:WaitForChild("leaderstats"). Make it a player object.