Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Strange Code Snippet...Tween_C0...?

Asked by 8 years ago

I'm having trouble understanding this...

I looked through Youtubes' gun pack a while back and I decided to look at it again just to study it. I noticed something, there is a setting at the top that looks like this:

    ,AimAnim = {
        Enabled = false
        ,Frames = 50
        ,Time = 0.1
    }

Strange thing happens when you enable it...it zooms the camera in dynamicly, but you see the bottom of the gun instead of the sights. Upon closer inspection, I thought of looking at the Button2Down event and found this interesting snippet of code:

            if Settings.AimAnim.Enabled then
                Delay(0, function()
                    Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time,                    Right_Weld.C0, CFrame.new(0, -1.5, 0))
                end)
                Delay(0, function()
                    Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftPos)
                end)
            else
                Right_Weld.C1 = Settings.RightPos
                Right_Weld.C0 = CFrame.new(0, -1.5, 0)
                Left_Weld.C1 = Settings.LeftPos
            end

The "Tween_C1" and "Tween_C0" are both underlined in blue, which is a note by the de-bugger, when I hovered over it, it said "W001: Unkown Global 'Tween_C0/Tween_C1'". Is this some kind of old CFraming system made by ROBLOX? Did he not include a function he had in the script? Was Tween_C1 so old that it was removed? Was it deprecated when Youtubes created this gun? Why did he use something that doesn't exist? Is there a way to Tween CFrames?

0
I've seen TweenJoint which is pretty much the same thing, in TurboFusion's gunkit, which can be found in free models, this is most likely not a past roblox thing, it will probably be quite difficult to understand unless your good at math and problem solving(I couldn't understand it :P) dragonkeeper467 453 — 8y
0
I'm quite sure Tween_C0 and Tween_C1 are functions made by the scripter like TweenJoint was dragonkeeper467 453 — 8y
0
Hmm...odd. Why didn't he add the functions...? lightpower26 399 — 8y

Answer this question