Skip to content

Commit

Permalink
Migrate events
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarber committed May 24, 2018
1 parent 231f21e commit f12518e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Models/Core/MainModule/BaseScript.lua
Expand Up @@ -21,6 +21,14 @@ BaseScript:AddProperty({
),
AllowOverride = false,
})
BaseScript:AddProperty({
Name = "InputEvent",
Type = "ObjectValue",
SchemaFn = Schema.Optional(
Schema:IsA("BindableEvent")
),
AllowOverride = false,
})

function BaseScript:initialize(input)
BaseInstance.initialize(self, input)
Expand All @@ -37,6 +45,9 @@ function BaseScript:initialize(input)

self:SetScript(input.Script)
self:SetConfigurationFolder(self:GetScript():FindFirstChild("Configuration", false))
local event = Instance.new("BindableEvent", self:GetScript())
event.Name = "InputEvent"
self:SetInputEvent(event)
end

return BaseScript

0 comments on commit f12518e

Please sign in to comment.