I got error on one line

— Fixed thank you guys for checking this —

1 Like
if player:WaitForChild("Equipped").Value ~= nil then

The reason why you would need to add a WaitForChild Statement is because the Equipped Instance may not exist in the player before the script is executed.

2 Likes

Equipped doesn’t exist in the player (yet)

You can fix this by:

local Equipped = player:FindFirstChild(“Equipped”);

if Equipped then
—code
end

1 Like

You need to add " " around the words so that it becomes a string.

Edit: While you still need to do that for the code at the top of the script (near line 100), the Equipped error is pointing to line 133. That means that there isn’t anything called “Equipped” in the player.

1 Like

Thanks! for helping me devcramp

i see im a bit confuse on the line 100 and 98

how to stop being red line?

This is because when you’re trying to look for an Instance or adjust certain properties such as the Name of an Instance, you need to make it a String. In order to do this, add quotation marks around it.

For example, it’d go from petName to "petName".

1 Like
local petName = game.ReplicatedStorage:WaitForChild("Pets"):FindFirstChild(pet.Name)
stringValue.Name = tostring(petName.Value or petName.Text or petName.Name)

Can i ask something because theres still problem can i talk to you on disc DylTheDev#3587

Something#2357⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀