Attempt to compare Instance

So I have a script that allows a player’s item to add 1 whenever their tool is touched to a harvestable item with a BoolValue that contains a true value. And here is the error I got.

image

Here is my script.

Send help!

2 Likes

The highlighted part is where the error starts to occur.

What I see wrong is that you did items <= spaces and not items.Value <= spaces. spaces is also a value so do items.Value <= spaces.Value

2 Likes

You have to add property Value next to the instance items and spaces.

2 Likes

Hmmmm…
This is weird stuff happening, for some reason script is comparing object (value) with bolean value (true-false). Try just with cheching if value is in object.
EDIT: its items and spaces, they are causing problem, you need to add

item.Value

same for spaces

1 Like

Thank you for the solution! My brain is acting up today.

Thank you!

dont mind this aaaaaaaaaaaaaaaaa