- What do you want to achieve? Keep it simple and clear!
I want to make a dialogue choice for my game
- What is the issue? Include screenshots / videos if possible!
My function works for the first time (just like the title says), but it just casts an error on the second time saying, attempt to call a number value.
The function itself isn’t calling the error, but calling it causes the error:
-- EventType is one of the variables from a table; table[1]
if EventType == "Dialogue" then
WriteDialogue(DialogueVoice, DialogueWritingTime, Value, DialogueBoxInfo, DialogueTextInfo, FaceInfo, InstanceInteracted)
elseif EventType == "DialogueChoice" then
print(Info)
DialogueChoice(Value, DialogueVoice, DialogueWritingTime) -- This is causing errors
elseif EventType == "DialogueShow" then
DialogueBox.Visible = true
elseif EventType == "DialogueHide" then
DialogueBox.Visible = false
end
This above gets a module script and reads the “event timeline” and when the dialogue recognises the type of event, it performs it; in this case dialogue, dialogue choices, etc.
This above also comes from a bindable function “.On invoke”
- What solutions have you tried so far? Did you look for solutions on the Creator Hub?
I tried to but some posts aren’t very helpful