So I'm trying to give the player a sword when saying a specific thing, heres my code: workspace:WaitForChild("Sand Person Noob Carl"):WaitForChild("Head"):WaitForChild("Dialog").DialogChoiceSelected:connect(function(Player,Choice) if (Choice.UserDialog == "Well, I'm here to help!") then local player = game.Players:GetPlayerFromCharacter(workspace) wait(2) game:GetService("Chat"):Chat(workspace["Sand Warrior Noob Mart"].Head, "Yeah?", Enum.ChatColor.Green) wait(2) game:GetService("Chat"):Chat(workspace["Sand Person Noob Carl"].Head, "Can you give him a weapon?", Enum.ChatColor.Green) wait(2) game:GetService("Chat"):Chat(workspace["Sand Warrior Noob Mart"].Head, "Sure, I have TONS of swords, take this and go slay those stupid bandits!", Enum.ChatColor.Green) game.ServerStorage:FindFirstChild("Sword"):Clone().Parent = player:WaitForChild("Backpack") wait(2) game:GetService("Chat"):Chat(workspace["Sand Person Noob Carl"].Head, "You heard Mart! Go get'em!", Enum.ChatColor.Green) end end)

1 comment

0

Your code is too messy to read. Please indent and space it out.