So, after the player cooks all parts of the burger, including two toasted bread, a cooked beef patty, and cheese, they will put it on a plate in order, which is toasted bread, cooked beef patty, cheese, and then another toasted bread, they should be able to click the touch part, and it should give them the completed burger. But then it doesn’t give them the burger though. Everything else works fine for the cooking scripts though.
My server storage where all tools are stored.
Here below is the script that doens’t work!
local click = script.Parent.TouchPart.ClickDetector
local currentPart = script.Parent.CurrentBurgerPart
local tool = game.ServerStorage["Cheeseburger"]
local burgerParts = script.Parent.BurgerParts
function onClick(player)
if currentPart == 3 then
currentPart = 0
burgerParts.BottomBread.Transparency = 0
burgerParts.BottomBread.CanCollide = false
burgerParts.BeefPatty.Transparency = 0
burgerParts.BeefPatty.CanCollide = false
burgerParts.Cheese.Transparency = 0
burgerParts.Cheese.CanCollide = false
burgerParts.TopBread.Transparency = 0
burgerParts.TopBread.CanCollide = false
local clone = tool:Clone()
clone.Parent = player.Backpack
end
end
click.MouseClick:Connect(onClick)
Thats the int value that shows what part its on. So bottom bun would 1, beef would be 2 and cheese would be 3 and top bun would be 4 starting at 0. So it adds +1 to every part it adds