Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help with dialog?

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)

2 comments

0

Please place this in the code block.

0

no one going to help? ;/

1 answer

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?

4 comments

0

Oh, just in case you don't know how to place text into the Code Block, simply highlight it and press the Code Block icon.

0

That is not the problem. I got it all working, its the "local" by "money" line 7

0

The 'local' wouldn't have made any difference

0

12:13:31.325 - Workspace.Test Dumb.Head.Dialog.DialogScript:7: unexpected symbol near 'local' error for proof sir.

This discussion is preserved as it was. New answers, comments, and votes are closed.