I have this module script (Interface
) that controls GUI elements specifically. I have it placed in StarterGui>Interface
It doesn’t run at all, and results in no errors in the output window. I have tried commenting out the entire script and just adding a print
to see if it would even print anything, and nothing prints.
Any reason why its not working?
Interface
Module:
-- // Universal Grpahical User Interface Module
-- Not for Distribution/Public Use
-- Scripted by @aswdgsagdb
local modVersion = "V1.0"
local Interface = {}
-- // Cores (default/common functions)
function Interface.toggleFrame(element)
element.Visible = not element.Visible
end
function Interface.openFrame(element)
element.Visible = true
end
function Interface.closeFrame(element)
element.Visible = true
end
function Interface.tweenFrame(element, visiblity)
if visiblity == true then
element.Visible = true
-- add tween funct here
end
if visiblity == false then
element.Visible = true
-- add tween funct here
end
end
function Interface.showElement(element)
element.Visible = true
end
function Interface.hideElement(element)
element.Visible = false
end
function Interface.showGUI(GUI)
GUI.Enabled = true
end
function Interface.hideGUI(GUI)
GUI.Enabled = false
end
-- // Additionals (varies to project)
-- StartUp
function Interface.startUp()
-- add here
-- show the start screen
end
-- TeamSelector
function Interface.updateTeamFocus()
-- add here
-- update the information of what team to join
end
-- GameStatus
function Interface.updateGameSchedule(update)
-- add here
-- change the textlabel of GameSchedule
end
function Interface.updateGameTime(update)
-- add here
-- change the textlabel of GameTime
end
-- MiniMenu
function Interface.switchListToMiniMenu(update)
-- add here
-- use tween to switch the leaderbaord with the mini-menu
end
-- PlayerList
function Interface.updateCurrentPlayers(updateInfo)
-- add here
-- compile list current players in server
-- updateInfo is a TABLE of info
end
function Interface.updatePlayerFocus(updateInfo)
-- add here
-- show selected player info
-- updateInfo is a TABLE of info
end
-- Crafting
function Interface.updateCraftingList(updateInfo)
-- add here
-- compile list of craftable items and if its currently craftable by player
-- updateInfo is a TABLE of info
end
function Interface.updateCraftingFocus(updateInfo)
-- add here
-- show selected crafting info
-- updateInfo is a TABLE of info
end
-- PlayerStatus
function Interface.playerStatusesUpdated()
-- add here
-- show bars briefly
end
function Interface.updateHealth(update)
-- add here
-- tween bar
end
function Interface.updateStamina(update)
-- add here
-- tween bar
end
warn("Graphical User Interface " .. modVersion .. " Successfully Loaded.")
return Interface