ascript.Parent.DialogChoiceSelected:connect(function(player, choice) if p:GetRankInGroup(2672272) >= 4 then game.Lighting:findFirstChild(choice.Name) then game.Lighting:findFirstChild(choice.Name):clone().Parent = workspace end end) end
Your error was that there was a random then
in line 4, so here is the fixed code:
ascript.Parent.DialogChoiceSelected:connect(function(player, choice) if p:GetRankInGroup(2672272) >= 4 then game.Lighting:findFirstChild(choice.Name) game.Lighting:findFirstChild(choice.Name):clone().Parent = workspace end end) end
ALSO I didn't know if there was a typo in line 1 or if that was the name of the script you were calling on, so here is the fixed fixed code:
script.Parent.DialogChoiceSelected:connect(function(player, choice) if p:GetRankInGroup(2672272) >= 4 then game.Lighting:findFirstChild(choice.Name) game.Lighting:findFirstChild(choice.Name):clone().Parent = workspace end end) end