How can i do this with tables?

yeah the watermaps table stays the same aways but not the mapname depending on the mapname value the script goes through or not

do u mind printing the table before the if table.find?
also for future maps thats going through, make sure the one ur putting into table.find is a string value

if it still doesnt work, just use my function and if it returns true (meaning its one of the watermaps), do ur stuff

Screenshot 2024-11-21 230311

Screenshot 2024-11-21 230305

that finalmap is probably the instance itself, and not the Name (string), use .Name

1 Like

you should also print the table.find function, also don’t create two topics for one issue (it can lead to warnings and punishments)

what is your finalmap variable? a table or string or something else?

1 Like

The final map variable was an instance itself and the table was a string which is probably why its not working

1 Like

I was able to add the .Name to the finalmap variable and it now works thanks for the advice

1 Like

just use table.find(WaterMaps, finalmap.Name) then, you need to get the name of the instance

i knew that might be the case ._.

1 Like

Homie, return table.find(t, val) ~= nil.

his problem already got solved, the reason this thread is still active is because he didnt put my reply as the solution yet

Yes, I’m aware that this is solved.