function grillfunctions:Submit(player)
while grilltable.FoodCount ~= grilltable.FoodRequired do
local foods = self.Character:FindFirstChild("Tray").Foods:GetChildren()
local v = foods[#foods]
if v ~= nil then
if v:FindFirstChildWhichIsA("Attachment") ~= nil then
local rarity = v:FindFirstChildWhichIsA("Attachment").Name
if rarity then
local value = game.ReplicatedStorage.ExtraCoin:FindFirstChild(rarity).Value
grilltable.DishValue += value
end
end
v:destroy()
else
break
end
grilltable.FoodCount += 1
task.wait()
return
end
end
With:
function grillfunctions:Submit(player)
while grilltable.FoodCount ~= grilltable.FoodRequired do
local foods = player.Character:FindFirstChild("Tray").Foods:GetChildren()
local v = foods[#foods]
if v ~= nil then
if v:FindFirstChildWhichIsA("Attachment") ~= nil then
local rarity = v:FindFirstChildWhichIsA("Attachment").Name
if rarity then
local value = game.ReplicatedStorage.ExtraCoin:FindFirstChild(rarity).Value
grilltable.DishValue += value
end
end
v:destroy()
else
break
end
grilltable.FoodCount += 1
task.wait()
return
end
end
Same initial issue. I changed to your 2nd block, but retained the original for the script. Changing to the other version CookingFuncs:Submit(player) returned a âattempt to call missing method âSubmitâ of tableâ
Iâm not sure if there is a way to combine functions that rely on my first table values to be in the same table as the keys of said values. I need the values to be in the original table as well so that they can be referred to from the original script.
It all results into the same issue of Submit is not a valid member of Player âPlayers.tz_owâ . I think Iâll just have to redo the entire part and try to figure out what went wrong. Will be a learning process for me again as well since I do lack experience in handling modulescripts. Thanks for your help. I appreciate everyone who attempted as well.