game.ReplicatedStorage.Transfromgold.UNDOTRANS.OnServerEvent:Connect(function(plr)
local chr = plr.Character
local hum = chr.Humanoid
local waited = plr.PlayerGui:WaitForChild("er")
for _,none in pairs(hum:GetChildren()) do
if none:IsA("NumberValue") then
none:Remove()
end
end ---this part wont work
for _,kill in pairs(waited:GetChildren()) do
if kill:IsA("NumberValue") then
local copy = kill:Clone()
copy.Parent = workspace
end
end
---
end)
COMMUNITY QUESTION
idk whats wrong with the script no errors but it wont work and its not disalbed how do i fix?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
You can't access PlayerGui from a server script. Use a remote event to tell the client to edit the gui. Also :remove() is deprecated. Use :Destroy()
i am using a remote event it sill dose not work event after destory()
Remove is deprecated?
yeah it dose not parent the the clone