Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Quest System I Made Not Working With No Errors?

Asked by 5 years ago
Edited 5 years ago

So the script is:

local tools = game.ReplicatedStorage.ChristmasEvent:GetChildren()
    local starterGui = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')
game.Workspace["Gingerbread Man"].Head.Dialog.DialogChoiceSelected:connect(function(player, Dialog)
        if Dialog.Name == 'QuestGiver' then
starterGui.Quests.QuestsText.Text = "Quest: 0/8 Reindeer And 0/5 Sleigh Parts"
        if game.Players.LocalPlayer.Backpack:FindFirstChild(tools) then
            local clone = game.ReplicatedStorage.Eggnog:Clone()
             clone.Parent = game.Players.LocalPlayer:FindFirstChild("Backpack")
        end
    end
end)

The problem is at the end i doesn't give me the Eggnog and shows no errors. Christmas Event (Line 1) has all the items I want to be in the player's inventory. My original problem was everything was in server storage and when I thought for once I realized server can't be accessed by local script. So I just changed it to replicated (Simple). I have the items in my inv and it just doesn't give me the eggnog any suggestions?

SOLVED: FindFirstChild can't be done with a variable so I tried GetChildren(tools) and it worked fine thanks everyone who tried to help! :)

2 answers

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Dialog choices weren't updated to work in FE.

roblox seems to not have updated dialogs. They only work in local scripts now. So you might need remote events. Or you could make your own dialog system which I recommend since it allows for customization. Plus I don't see roblox updating dialogs to work in server scripts. You would still need remotes anyways if the server needs to do something.

My original problem was everything was in server storage and when I thought for once I realized server can't be accessed by local script. So I just changed it to replicated (Simple).

Keep it in server storage.

Ad
Log in to vote
0
Answered by 5 years ago

Try this instead for the cloning service,

local clone = game.ReplicatedStorage.Eggnog:Clone().Parent = game.Players.LocalPlayer:FindFirstChild('Backpack')

If that doesn't work It could be that in line '06' you didn't define a string value FindFirstChild('Tools')

0
This doesn't seem to be the case. Also can you provide a way to fix the string value because I thought string values would be the only thing to work. So I did FindFirstChild("Tool", "Tool") and so on. Which was a LONG line of code and it didn't work so any help? maybe find first child christmas event and then do get children? CosmicIsGod 139 — 5y
0
I did some prints to find the issue it is by the findfirstchild(tools) any suggestions? CosmicIsGod 139 — 5y
0
Ok, sorryy to get back to you late, computer got taken jordysboy 53 — 5y

Answer this question