-
What do you want to achieve? I want to require a modulescript through my plugin
-
What is the issue? i am doing require() correctly with no syntax error but it seems that the plugin script just stops
-
What solutions have you tried so far? I have done a quick google search and around the devforum
here is part of the main script:
print("Running Plugin")
local toolbar = plugin:CreateToolbar("Remind Me")
local settingsButton = toolbar:CreateButton("Open Settings", "Open Remind Me Settings", "rbxassetid://5606240016")
print("Runs") -- prints
local UIManager = require(script.Parent.UIManager) -- Line that stops all the code
print("UI") -- does NOT run
local ClockModule = require(script.Parent.UIManager.UpdateClocks)
print("Clock")
local TweenModule = require(script.Parent.TweenModule)
print("Tween")
here is the modulescript for the UIManager:
local CoreGUI = game:GetService("CoreGui")
local SoundService = game:GetService("SoundService")
local TweenModule = require(script.Parent.TweenModule)
local ClockModule = require(script.UpdateClocks)
local EventModule = require(script.Event)
local TopTweenPos = {UDim2.new(0.5, 0, -0.01, 0), UDim2.new(0.5, 0, -0.3, 0)}
local RemindTweenPos = {UDim2.new(1.015, 0, 0.862, 0), UDim2.new(1.5, 0, 0.862, 0)}
local RemindImages = {
['Breakfast'] = "http://www.roblox.com/asset/?id=5605699715",
['Lunch'] = "http://www.roblox.com/asset/?id=5605700166",
['Dinner'] = "http://www.roblox.com/asset/?id=5605986840",
['Water'] = "http://www.roblox.com/asset/?id=5605700979",
['Audio'] = "http://www.roblox.com/asset/?id=302250236"
}
local RemindFlavorText = {
['Breakfast'] = "Remember to go eat Breakfast soon!",
['Lunch'] = "Make sure to go eat a healthy Lunch and take a small break!",
['Dinner'] = "Go eat some dinner soon!",
['Water'] = "If you aren't making progress go take a break and Hydrate!",
['Audio'] = "You're Reminder went off!"
}
local module = {}
module.RemindDb = false
function module:init(clonedUI) --Initializes plugin
print("Initializing Remind Me...")
local ViewportUI
if CoreGUI:FindFirstChild("ViewportUI") then
for i,v in pairs(CoreGUI:GetChildren()) do
if v.name == "ViewportUI" then
v:Destroy()
end
end
ViewportUI = clonedUI.ViewportUI
ViewportUI.Parent = CoreGUI
else
ViewportUI = clonedUI.ViewportUI
ViewportUI.Parent = CoreGUI
end
ViewportUI.Top.Position = TopTweenPos[2]
ViewportUI.Remind.Position = RemindTweenPos[2]
if plugin:GetSetting("Custom") then -- follows custom settings
else -- if plugin did not have settings changed
EventModule:SetEvent("07:30", "Breakfast", "Breakfast") -- Breakfast
EventModule:SetEvent("12:00", "Lunch", "Lunch") -- Lunch
EventModule:SetEvent("18:30", "Dinner", "Dinner") -- Dinner
EventModule:SetIntervalEvent(60, "Water", "Water") -- Water Reminders
end
end
function module:Remind(object, length, picture)
if module.RemindDb == true then return "no" end
delay(0, function()
module.RemindDb = true
ClockModule:UpdateClock(object.Text, 1) -- Updates Remind Clock
object.Image.Image = RemindImages[picture]
object.Text.Text = RemindFlavorText[picture]
TweenModule:Tween(object, RemindTweenPos[1], .2)
SoundService:PlayLocalSound(script.Parent.Sound.RemindDing)
wait(length/5)
SoundService:PlayLocalSound(script.Parent.Sound.RemindDing)
wait(length/5)
SoundService:PlayLocalSound(script.Parent.Sound.RemindDing)
wait(length/3)
TweenModule:Tween(object, RemindTweenPos[2], .3)
module.RemindDb = false
end)
end
function module:topEnter(object)
object.Visible = true
TweenModule:Tween(object, TopTweenPos[1], .2)
end
function module:topLeave(object)
delay(0, function()
TweenModule:Tween(object, TopTweenPos[2], .2)
wait(.2)
object.Visible = false
end)
end
return module
I am storing my local plugins inside of a folder on my desktop if that might have something to do with it
I am also a bit new to using module scripts and plugins so sorry if its something easy
Here is the plugin file because I’m that desperate lol: Remind_Me.rbxmx (29.6 KB)