So, I am trying to add pets into my game. The pets themselves work fine and as they should when I insert them into my charecter. So, I made a GUI and a button within it that SHOULD make it so when you click the button, the pet appears. However, for some reason the script does not work.
You click the button, and a error message in the output comes up saying this:
Please help me fix this problem the current script is:
local target=game.ReplicatedStorage.Pet
script.Parent.MouseButton1Click:Connect(function()
if game.Players.LocalPlayer.C:FindFirstChild(“Pet”)==nil then
local pet=target:Clone()
pet.Parent=game.Players.LocalPlayer.Character
pet.LocalScript.Disabled = falseend
end)