Give tool script not working

I am trying to make a script when the fire is done, a tool will appear but it’s not working, does anyone know how to fix it?

local fire1 = game.Workspace.Oven.FireFolder.fire1.Fire
local fire2 = game.Workspace.Oven.FireFolder.fire2.Fire
local fire3 = game.Workspace.Oven.FireFolder.fire3.Fire
local fire4 = game.Workspace.Oven.FireFolder.fire4.Fire
local fire5 = game.Workspace.Oven.FireFolder.fire5.Fire

local tool = game.ReplicatedStorage:WaitForChild("Cup")

local ScreenGui = script.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function(p)
	ScreenGui.Enabled = false
	
	fire1.Enabled = true
	wait(0.1)
	fire2.Enabled = true
	fire1.Enabled = false
	wait(0.1)
	fire3.Enabled = true
	fire2.Enabled = false
	wait(0.1)
	fire4.Enabled = true
	fire3.Enabled = false
	wait(0.1)
	fire5.Enabled = true
	fire4.Enabled = false
	wait(0.1)
	fire5.Enabled = false
	wait(1)
	local give = tool:Clone()
	give.Parent = p.Backpack
end)

This is a local script, correct? You need to remove the “p” in this line:

You also need to redefine the player. You can do something like this:

local p = game.Players.LocalPlayer
1 Like

It worked thank you so much! :smiley:

No problem. Glad it works now :slight_smile:

Mark it as solution then :slight_smile: