I'm trying to give a weapon to a player after they've chosen a specific dialog. I know only a little scripting so it just may be me. I don't know what is wrong with my script. I've tried many alternatives like switching the position of the script (while changing the script too by ading a parent) but nothing seems to work for me, even tutorials on youtube and google.
Script:
script.Parent.DialogChoiceSelected:connect(function(player, choice) if (choice == script.Parent.Choice2) then -- the dialog selects Choice2? pistol = game.Lighting["M1911"]:clone() pistol.Parent = player.Backpack -- the dialog clones and loads the M1911 into the player's backpack from the lighting? end end)
Explorer:
Dialog DialogChoice Script Choice1 Choice2
Lighting:
Lighting (other random stuff) (other random stuff) (other random stuff) M1911
you could try an if an then command for example if choice 1 then the item would be duplicated from the lighting and brought to the players backpack