#Help me dissect error

41 messages · Page 1 of 1 (latest)

fossil wind
#

I've been scripting using tweenservice and dont know what my error is. Pls help (screenshot is my error)


local partsFolder = game.Workspace:WaitForChild("partsFolder")

local function partExtendTween(partModel, positionY, positionZ)
    local Info = TweenInfo.new(-assume info is here
    )
    
    local Goals =

        {
            

            Size = Vector3.new(1, 1, 200),
            Orientation = Vector3.new(720 - 15 ,360 + 180,0),
            Color = Color3.fromRGB(99, 95, 98),    
            Position = Vector3.new(14, positionY, positionZ)


        }
    
    
    local goalsNeonPart = {
        
        Size = Vector3.new(1, 1, 200),
        Orientation = Vector3.new(720 - 15 ,360 + 180,0),
        Color = Color3.fromRGB(255, 255, 255),    
        Position = Vector3.new(14, positionY, positionZ),
        Transparency = 1
        
        
    }
    
    tweenService:Create(game.Workspace.partsFolder[partModel].extendingPart, Info, Goals):Play()
    tweenService:Create(game.Workspace.partsFolder[partModel].extendingNeon, Info, goalsNeonPart):Play()

    
end

partExtendTween(partsFolder["extendModel1"], 31.009, -53.432)
partExtendTween(partsFolder["extendModel2"], 43.95,  -101.728)

tired glade
fossil wind
rancid pawnBOT
#

studio** You are now Level 2! **studio

fossil wind
#

This is my usecase if its also important here

tired glade
#

Alr, so on line 86 you gotta put game.Workspace.partsFolder[partModel.Name].extendingPart

rancid pawnBOT
#

studio** You are now Level 1! **studio

tired glade
#

Same for line 87, but instead of extendingPart, put extendingNeon.

#

Also, why are the goals called Goals) and goalsNeonPart)

#

Why the parentheses?

fossil wind
#

too lazy to change it

#

and isn't the parenthesis supposed to house the parameters of the :Create() function?

#

unless I need only 1 goal and can remove that table already

tired glade
#

Oh my bad

#

Nothing wrong with it don't worry

#

just change that thing I told you before

fossil wind
#

Still not working

junior charm
#

Show partsFolder in your script and the instance it reference in the Explorer

#

We'll need to see its children too

fossil wind
#

heres my partsFolder

junior charm
#

For just partModel

fossil wind
#

Wym drop

fossil wind
#

It still doesnt work

junior charm
#

You did not do as I asked

junior charm
fossil wind
#

Like this?

rancid pawnBOT
#

studio** You are now Level 3! **studio

junior charm
#

(partModel is nil)

fossil wind
#

Would these happen to be an issue?

junior charm
#

Review all functions calls and trace them back

#

You can use debug.traceback in a conditional that checks if partModel is nil

fossil wind
#

Okay I solved it now

#

I just traced back my scripts and I realized that I had partextendtween used elsewhere and I forgot to remove it