I am trying to make a give item command for a restaurant game and the give item script does not work
local Players = game:GetService("Players")
Players.PlayerAdded:connect(function(Player)
Player.Chatted:Connect(function(msg)
local SplitString = msg:split(" ")
if SplitString[1] == ";give" then
warn("yes")
print(SplitString[2])
local bruh = workspace:FindFirstChild(SplitString[2])
local ahahha = game.Players:GetPlayerFromCharacter(bruh)
if ahahha == true then
print("found player")
local andd = Player.Character:FindFirstChild("BloodBot"):Clone()
andd.Parent = ahahha:FindFirstChild("Backpack")
Player.Character:FindFirstChildWhichIsA("Tool"):Destroy()
elseif ahahha == false then
warn("no work :(")
end
end
if SplitString[1] == ";speed" then
local bruh = SplitString[2]
Player.Character:FindFirstChild("Humanoid").WalkSpeed = SplitString[2]
end
end
)
end)
help is appreciated