Hello! I am currently making a cafe game but I need help with the food. I am currently scripting a cake tool and when you step on it appears as a tool. That is working perfectly fine. However, you can only get 1 cake which is a problem. When I step on it, you only get 1 cake and nothing else. So if somebody else wanted to have the cake, they can't get it. How do i fix this?
This is my code
local Tool = script.Parent
enabled = true
function onActivated() if not enabled then return end
enabled = false
Tool.GripForward = Vector3.new(0.439, 0.878, 0.189)
Tool.GripPos = Vector3.new(-0.3, 1.2, -1.3)
Tool.GripRight = Vector3.new(0.0844, 0.169, -0.982)
Tool.GripUp = Vector3.new(0.894, -0.347, 0)
Tool.Handle.EatSound:Play()
script.Parent.Bites.Value = script.Parent.Bites.Value + 1 wait(.8)
Eable() local h = Tool.Parent:FindFirstChild("Humanoid") if (h ~= nil) then if (h.MaxHealth > h.Health + 1.6) then h.Health = h.Health + 1.6 else h.Health = h.MaxHealth end end
Tool.GripForward = Vector3.new(-1, 1, -0)
Tool.GripPos = Vector3.new(0.1, -0.3, 0)
Tool.GripRight = Vector3.new(0,0, -1)
Tool.GripUp = Vector3.new(1,0,0)
enabled = true
end
function onEquipped()
end
script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped)
script.Parent.Handle.Touched:connect(onTouched)
function Eable() if (script.Parent.Bites.Value) > 2 then script.Parent:Remove() end end
Please help me with this issue. Thanks!

10 comments
PLEASE ANSWER ASAP
Please provide an error as we can not debug it without one.
There is no error, I need to see if the code is fine. Duh
Could you please put all your code in a code block. This is very difficult to read.
Only comment here if you have an answer, thanks.
So you’re saying the cake is a tool, but when someone touches it, they take it and no one else can get it as they have it?
yeah
What a spoiled brat. People trying to help you and you act like this. Maybe you should respect the fact someone is trying to help.
By the way, we don't need any more cafes on roblox.
It doesn't matter. I am not spoiled. Also, who said we don't. You can't stop me from making one. It's been my ambition since and now you're just gonna put me down, how selfish.