local script inside text box, no errors in output and it will not clone the pet inside player character after the text inside text box is test
local pet = game.ReplicatedStorage:WaitForChild("Pet")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local text = script.Parent
if text.Text == "test" then
local clone = pet:Clone()
clone.Parent = char
end

1 comment
This code is not being ran in a event so it will only be ran once. You should use the changed event or GetPropertyChangedSignal