I'm making a golf course with my friend and we want the bots to give the players a golf club. However, after finishing the conversation, players do not receive the club
script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice == script.Parent.choice1) then if (player.Backpack:findFirstChild("Putter")==nil) then putter = game.Lighting.Putter:clone() putter.Parent = player.Backpack end end end)
This should fix it ;)
script.Parent.DialogChoiceSelected:connect(function(player,choice) if choice==script.Parent.choice1 then if player.Backpack:FindFirstChild("Putter") then else local putter=game.Lighting.Putter:Clone() putter.Parent=player:WaitForChild("Backpack") end end end)