Hi
I have been creating a tycoon lately and one thing a tycoon with pvp must have is weapons
but everytime I try and make a tool giver nothing works.
I make a part I insert a click detector and insert a script into the part.
and I put a sword into ReplicatedStorage
The Script:
local tool = game.ReplicatedStorage.Card
local giver = script.Parent
local canGive = false
local function GiveTool(player)
if canGive == false then
canGive = true
local clone = tool:Clone()
clone.Parent = player.Backpack
wait(1)
canGive = false
end
end
giver.ClickDetector.MouseClick:Connect(function(player)
GiveTool(player)
end)
I would really appreciate if anyone could help me out here