What I want to do is repeat the RemoteEvent until the CurrentFruit is equal to one of the Fruits in the table. How do I do that?
local fruits = {"Apple", "Orange", "Pineapple"}
local eatevent = game:GetService("ReplicatedStorage").EatEvent
local plr = game.Players.LocalPlayer
local currentfruit = plr.Data.Fruit
repeat
eatevent:FireServer()
until
currentfruit.Value:lower() == fruits:lower()

6 comments
is there any way i could use :lower() on table.find?
i don't see a function called :lower(), what is it?
its to make strings lowercase for example if i did local text = "WORD" print(text:lower()) then the output would be "word"
oh, it is string.lower(text)
however i suggest just changing the uppercases in the table to be lower case >.> and then changing currentfruit.Value into string.lower(currentfruit.Value)
thank you very much for telling me!