I have a bunch of methods in a particular service. I’m exposing one of them to the client.
function UIService:CreateTween(instance: GuiObject, propertyTable: {[string]: any}, length: number, easingStyle: Enum.EasingStyle, ...) -- Hidden Method
return TweenService:Create(instance, TweenInfo.new(length, easingStyle or Enum.EasingStyle.Sine, ...), propertyTable) -- The tween is made here
end
function UIService.Client:CreateTween(player: Player, ...) -- Exposed Method
return self.Server:CreateTween(...) -- At this point the tween still exists
end
I also have a controller that uses the said method to create tweens, but the method returns nil when it shouldn’t.
function InteractionController:KnitStart()
local UIService = Knit.GetService("UIService")
--//
local TweenPromptIn = UIService:CreateTween(Prompt, {Size = UDim2.new(4.5, 0, 4.5, 0)}, .15)
local TweenPromptOut = UIService:CreateTween(Prompt, {Size = UDim2.new(0, 0, 0, 0)}, .15)
--//
print(TweenPromptOut) -- This is equal to nil which it shouldn't
end
I’m not sure what causes this. I also have promises disabled on the client side.