Script not working

I’m trying to make a bakery GUI system where you choose what batter you want then when you choose what batter you want it doesn’t clone the batter part to the tray in it doesn’t work here the script
local chocolate = script.Parent.chocolate
local vanilla = script.Parent.vanilla
local tray = game.Lighting.CookieTray

local function cloneBatterPart(batterPart)
local clonedPart = batterPart:Clone()
clonedPart.Parent = tray
end

chocolate.MouseButton1Click:Connect(function()
local batterPart = workspace.Batter.CookieBase
cloneBatterPart(batterPart)
end)

vanilla.MouseButton1Click:Connect(function()
local batterPart = workspace.Batter.CookieBase
cloneBatterPart(batterPart)
end)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.