What do you want to achieve?
I have a tool giver that is supposed to give the player a tool from ServerStorage. When a player uses the giver however it gives the player the original tool instead of the cloned tool.
What is the issue?
This creates a problem because if I were to destroy the tool in the player’s backpack/inventory then the original tool won’t be in ServerStorage anymore as it’d be destroyed.
What solutions have you tried so far?
I’ve tried searching the DevForum but I struggled to find a post that was specific to my situation. I also have tried rewriting my script but I’m not very confident in my abilities (as I’m very new to scripting) and nothing works.
Try this if i am understanding what you are trying to do
local Player = game.Players.LocalPlayer
local pizza = game.Workspace.PupperoniPizza
local prp = script.Parent
local customer = prp.Parent
if game.StarterPlayer["Pup Pizza"].Value == true then
Player.leaderstats.Money.Value = Player.leaderstats.Money.Value + 25
game.StarterPlayer["Pup Pizza"].Value = false
local pizzatool = Player.Backpack:FindFirstChild("Pupperoni Pizza") or Player.Character:FindFirstChild("Pupperoni Pizza")
if pizzatool then
pizzatool.Cheese.Transparency = 1
pizzatool.Toppings.Transparency = 1