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?
local dialog = script.Parent dialog.DialogChoiceSelected:connect(function(player, choice) local stats = player:FindFirstChild("leaderstats") if not stats then return local money = stats:FindFirstChild("money") if not money then return if choice == script.Parent.DialogChoice.ChoiceA Then if gold amount >= 0 then game.ReplicatedStorage.FishingPole:clone().Parent = player.Backpack 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.
local dialog = script.Parent.dialog.DialogChoiceSelected:connect(function(player, choice) local stats = player:FindFirstChild("leaderstats") if not stats then return local money = stats:FindFirstChild("money") if not money then return 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?