Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-Toney committed Apr 16, 2022
1 parent 4a10012 commit 46edce6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions client/DialogueClientScript.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ for _, npc in ipairs(NPCDialogue) do
local success, msg = pcall(function()

local DialogueSettings = require(npc.DialogueContainer.Settings);
local SpeechBubbleEnabled = DialogueSettings.SpeechBubbleEnabled or (typeof(DialogueSettings.SpeechBubble) == "table" and DialogueSettings.SpeechBubble.Enabled);
local SpeechBubblePart = DialogueSettings.SpeechBubblePart or (typeof(DialogueSettings.SpeechBubble) == "table" and DialogueSettings.SpeechBubble.Part);
local SpeechBubbleSettingsIsTable = typeof(DialogueSettings.SpeechBubble) == "table";
local SpeechBubbleEnabled = DialogueSettings.SpeechBubbleEnabled or (SpeechBubbleSettingsIsTable and DialogueSettings.SpeechBubble.Enabled);
local SpeechBubblePart = DialogueSettings.SpeechBubblePart or (SpeechBubbleSettingsIsTable and DialogueSettings.SpeechBubble.BasePart);
local PromptRegionEnabled = DialogueSettings.PromptRegionEnabled or (typeof(DialogueSettings.PromptRegion) == "table" and DialogueSettings.PromptRegion.Enabled);
local PromptRegionPart = DialogueSettings.PromptRegionPart or (typeof(DialogueSettings.PromptRegion) == "table" and DialogueSettings.PromptRegion.Part);
local ProximityPromptEnabled = DialogueSettings.ProximityPromptEnabled or (typeof(DialogueSettings.ProximityPrompt) == "table" and DialogueSettings.ProximityPrompt.Enabled);
Expand Down
3 changes: 1 addition & 2 deletions client/DialogueClientScript/API/Triggers.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local TriggerModule = {};

local ProximityPrompts = {};
local SpeechBubbles = {};
local ClickDetectors = {};
Expand All @@ -20,7 +19,7 @@ function TriggerModule.CreateSpeechBubble(npc: Model, properties: {[string]: any
SpeechBubbles[npc].ResetOnSpawn = false;
SpeechBubbles[npc].Size = properties.SpeechBubbleSize or properties.SpeechBubble.Size;
SpeechBubbles[npc].StudsOffset = properties.SpeechBubbleStudsOffset or properties.SpeechBubble.StudsOffset;
SpeechBubbles[npc].Adornee = properties.SpeechBubblePart or properties.SpeechBubble.Part;
SpeechBubbles[npc].Adornee = properties.SpeechBubblePart or properties.SpeechBubble.BasePart;

local SpeechBubbleButton = Instance.new("ImageButton");
SpeechBubbleButton.BackgroundTransparency = 1;
Expand Down

0 comments on commit 46edce6

Please sign in to comment.