— Fixed thank you guys for checking this —
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.
Equipped doesn’t exist in the player (yet)
You can fix this by:
local Equipped = player:FindFirstChild(“Equipped”);
if Equipped then
—code
end
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.
Thanks! for helping me devcramp
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"
.
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⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀