im just dont konow but i tried everything i have some code what works perfectly fine when in workspace but if i use it inside an worlmodel inside an viewportframe the tweens just dont play
local EasingStyle = Enum.EasingStyle.Quart
local EasingDirection = Enum.EasingDirection.In
local duration = 10
local repeatCount = 0
local reverses = false
local delayTime = 0
local pivotValue = Instance.new("CFrameValue")
pivotValue.Value = StartValeu
local tweeninfo = TweenInfo.new(duration,EasingStyle, EasingDirection, repeatCount, reverses, delayTime)
local tween = TS:Create(pivotValue, tweeninfo, {Value = Value})
pivotValue:GetPropertyChangedSignal("Value"):Connect(function()
instance:PivotTo(pivotValue.Value)
end)
--warn(tween)
tween:Play()
tween.Completed:Wait()
pivotValue:Destroy()
tried everyrhing but the model just doesnt update i use the same code with an other model and there it works just fine
You sure you parnted that under WorldModel inside viewportframe?
Also bro dont ever cook with code like that ever again
Cant you just weld model toghether and tween primary part?
That not even hacky at this point, its a warcrime in programming.
TL;DR: there is a chance that PivotTo doesnt update in viewportframe hence it doesnt fire any events.
That why do thing instead that i said above.
Anyways this tween thing is not efficient since you should really just set a primary part of the model and tween the primary part. (Putting all the tween info arguments as variables is kind of weird but it works so I won’t change it)
local EasingStyle = Enum.EasingStyle.Quart
local EasingDirection = Enum.EasingDirection.In
local duration = 10
local repeatCount = 0
local reverses = false
local delayTime = 0
local tweenInfo = TweenInfo.new(duration, EasingStyle, EasingDirection, repeatCount, reverses, delayTime)
local primaryPart = model:FindFirstChild("<Insert Here>")
local tween = TS:Create(primaryPart, tweenInfo, {Value = Value})
tween:Play()
tween.Completed:Wait()
welded and using primary part doesnt fix anything the other tweens work but the model not moving
local EasingStyle = else Enum.EasingStyle.Quart
local EasingDirection = Enum.EasingDirection.In
local duration = 10
local repeatCount = 0
local reverses = false
local delayTime = 0
local Instance = model.PrimaryPart -- actual path be fired in the function
local tweeninfo = TweenInfo.new(duration,EasingStyle, EasingDirection, repeatCount, reverses, delayTime)
local tween = TS:Create(instance, tweeninfo, {CFrame = CFrame})
--warn(tween)
tween:Play()
so i disabled the other tween and now it just only moves the primary part