Heyy im back again . I was working on a dialog script for my new game, and i get a error at line 7? My leaderboard has a the same thing as money. help?
01 | local dialog = script.Parent |
02 | dialog.DialogChoiceSelected:connect( function (player, choice) |
03 |
04 | local stats = player:FindFirstChild( "leaderstats" ) |
05 | if not stats then return |
06 |
07 | local money = stats:FindFirstChild( "money" ) |
08 | if not money then return |
09 |
10 | if choice = = script.Parent.DialogChoice.ChoiceA Then |
11 | if gold amount > = 0 then |
12 | game.ReplicatedStorage.FishingPole:clone().Parent = player.Backpack |
13 | end ) |
I edited the script a bit, I THINK it has to do with the fact that you did not use a period on the first line.. But I'll check.
1 | local dialog = script.Parent.dialog.DialogChoiceSelected:connect( function (player, choice) |
2 |
3 | local stats = player:FindFirstChild( "leaderstats" ) if not stats then return |
4 |
5 | local money = stats:FindFirstChild( "money" ) if not money then return |
6 |
7 | if choice = = script.Parent.dialog.DialogChoice.ChoiceA Then if gold amount > = 0 then game.ReplicatedStorage.FishingPole:clone().Parent = player.Backpack end ) |
Does this work for you?