I’m not exactly sure if this is exactly a problem with my script, but it seems to be, so I’m posting it here:
So I have a LocalScript in StarterPlayerScripts that checks if you’ve selected a certain dialog choice, and if you have, it gives you an item from ReplicatedStorage. When you get the item though, the first time you equip it, instead of it being in your hand it’s on the spot where I left it on the Workspace. The second time you equip it, it’s in your hand but the script for it doesn’t work at all.
I tested my item with the StarterPack and other methods like using ClickDetectors to give players items, and those times it works just fine, so I believe the problem is with the script. Here it is:
game.Workspace.BreadGuy.Head.Dialog.DialogChoiceSelected:Connect(function(player, pick)
if pick.Name == "BreadWant" then
local rs = game:GetService("ReplicatedStorage")
local bread = rs.Bread:Clone()
bread.Parent = player.Character
end
end)