Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

idk whats wrong with the script no errors but it wont work and its not disalbed how do i fix?

Asked by 5 years ago
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)

0
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() xPolarium 1388 — 5y
0
i am using a remote event it sill dose not work event after destory() helleric -3 — 5y
0
Remove is deprecated? Chaddaking 60 — 5y
0
yeah it dose not parent the the clone helleric -3 — 5y

Answer this question