code

local pl = game.Players.LocalPlayer
if pl then
local args = {
    [1] = "Delete",
    [2] = {
        [1] = game:GetService("ReplicatedStorage").Player_Data.pl.Pets["Basic Bear"]
    }
}

game:GetService("ReplicatedStorage").Events.Pet:InvokeServer(unpack(args))
end

the result should be if the Player name is Test then the output should look like

local pl = Test
if pl then
local args = {
    [1] = "Delete",
    [2] = {
        [1] = game:GetService("ReplicatedStorage").Player_Data.Test.Pets["Basic Bear"]
    }
}

game:GetService("ReplicatedStorage").Events.Pet:InvokeServer(unpack(args))
end

Instead my output is: pl is is not a valid member of folder

1 comment

0

code block