Need help with TweenService V2

I am still a beginner at scripting so please don’t be harsh.

  1. What do you want to achieve? Keep it simple and clear!
    I want to use TweenService v2 to reduce the server lag.

  2. What is the issue? Include screenshots / videos if possible!
    When I tried to require the ReplicatedTweening module it doesn’t proceed to the next line of the code. I am making a Tycoon that’s why I am utilizing this with the help of remote events the code won’t proceed after I require the module I added print before and after the require but only the before is printing. I tried using the sample code of the module but it still won’t proceed.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have watched @SteadyOn video about it but still no avail.

The Sample code is located at the StarterPlayerScripts and the Module is at the ReplicatedStorage I am not receiving any errors to

Sample Script

wait(10)
print("Start Require")
local CustomTweenService = require(game.ReplicatedStorage.ReplicatedTweening)
print("required")
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)

local tween = CustomTweenService:GetTweenObject(game.Workspace.Test, tweenInfo, {CFrame = CFrame.new(Vector3.new(0,0,0))})
print("TweenStart")
tween:Play()

Btw I am using V.2.2 of the module

Yes that’s all then I got the module at @SteadyOn github

As @chexedy said, you should use WaitForChild.
But if you don’t wanna use that, try using wait() at line 1. It will depend if it works.

Using wait() is terrible practice lmao, why would you not want to use WaitForChild

Nope It still did not print the

print("required")

image

But the part is at the server side I added it before I test the game.

No, you are creating a TweenObject in the LocalScript. The code you gave me is in a LocalScript.

1 Like

Oh woops silly me Thanks for pointing my mistake :smiley: