I’m trying to create my own quests handler on a local script and displaying it over a GUI. Triggered through a bindable event. The quest details are created trough StringValue.
At line 72. it gives me this error.
Code:
ReplicatedStorage.Events.QuestsTrigger.Event:Connect(function()
local questsFolder = ReplicatedStorage:WaitForChild("QuestsList")
for i, quests in pairs(questsFolder:GetChildren()) do --Gets all quests folder from the QuestsList
for i, SubList in pairs(quests:GetChildren()) do --Gets all stringValue from from a folder under QuestsList
if SubList and SubList:IsA("StringValue") and SubList.Parent == quests then
local title = SubList.Title.Value --Title of the quests --Error Here
local rewards = SubList.Rewards.Value --Rewards
local location = SubList.Location.Value --Location of the quests on the map
local descriptions = SubList.Description.Value --Description of the quests
local QuestsType = SubList.Type.Value --Type of quests
I have tried using it without its name however, the GUIs will only display one value from the quests details.
ReplicatedStorage.Events.QuestsTrigger.Event:Connect(function()
local questsFolder = ReplicatedStorage:WaitForChild("QuestsList")
for i, quests in pairs(questsFolder:GetChildren()) do --THIS ITERATES OVER THE CHILDREN OF THE QUESTSLIST FOLDER (THE FOLDER OF FOLDERS)
for i, SubList in pairs(quests:GetChildren()) do --THIS ITERATES OVER THE CHILDREN OF THE QUESTONE FOLDER (THE FOLDER OF VALUE INSTANCES)
if SubList and SubList:IsA("StringValue") and SubList.Parent == quests then --HERE YOU CHECK IF EACH VALUE INSTANCE IS A STRINGVALUE
local title = SubList.Title.Value --THE FIRST STRINGVALUE NAMED "Title" DOES NOT HAVE A CHILD/MEMBER/PROPERTY NAMED "Title"
This solve the issue for the local title yet the same issue persists on the other variables. I have tried putting the other quests details as a children of the title and calling it. It works.