Taming system help

i need help with scripting these are the scripts i have so far
ServerScriptsService

local Players = game:GetService(“Players”)

local function BlockSetup(player)
local leaderstats = Instance.new(“Folder”)
leaderstats.Name = (“TamedAnimals”)
local animals = Instance.new(“StringValue”) --Creating String value to know the animals name
animals.Name = “Horse” --Value Name
animals.Parent = leaderstats
leaderstats.Parent = player
end

Players.PlayerAdded:Connect(BlockSetup) – when player join add the animal file to the inv

and here is the script inside the block pet
workspace.folder(animals).blocky.ProximityPrompt

local prox = script.Parent

prox.Triggered:Connect(function(plr)
local folder = plr:WaitForChild(“TamedAnimals”)
local value = folder:FindFirstChild(“animals”)
value.Value = “Blocky”
end)

so im new to scripting but want to make a animal taming system so how i want the system to work is that there is a folder in workspace named animals and inside of the folder is blocky(pet) and inside of blocky there is a proximity prompt that contains the script above and i want to make it so that when the proximity prompt is pressed it will take the required food out of ur inv and use it to tame the blocky and if u dont have the required food a message will pop up saying “insufficient food” and if u succeed in taming it it will duplicate it into the localplayer folder(not done yet) and a picture of the blockys face will show up on the side of the screen with its name and lvl and when its clicked it will spawn next to you and will attack any hostile blockys that try to attack you and if ur blocky dies it dies for good and of course i want it to save ur blockys but like i said im new and dont know how to script that much so help/advice would be appreciated

1 Like

I have two things for you, first off put it in code notation
which can be done by add three ` at the start and the end

next move this to Scripting help