01 | local enabled = true |
02 | Player = script.Parent.Parent |
03 | mouse = Player:GetMouse() |
04 | run = game:GetService( "RunService" ) |
05 | local Left_Arm = script.Parent:FindFirstChild( "Left Arm" ) |
06 | local Right_Arm = script.Parent:FindFirstChild( "Right Arm" ) |
07 | local Core = script.Parent:FindFirstChild( "Torso" ) |
08 | local Left_Leg = script.Parent:FindFirstChild( "Left Leg" ) |
09 | local Right_Leg = script.Parent:FindFirstChild( "Right Leg" ) |
10 | function onKeyDown(key) |
11 | key = key:lower() |
12 | if key = = "t" then |
13 | game:GetService( "Chat" ):Chat(Player.Character.Head, "Focus the mind, reflect upon yourself, and determine the goal." ) |
14 | Left_Arm = Instance.new ( "Part" ) |
15 | Right_Arm = Instance.new( "Part" ) |
and i get this error 21:59:16.900 - Players.kingalpha1.Backpack.LocalScript:49: attempt to call global 'CFrame' (a table value)
The constructor for a new CFrame
value is CFrame.new
, just CFrame
i.e.,
1 | -- Correct code: |
2 | ... [ "Left Leg" ] .CFrame *CFrame.new( 2 , 3 , 2 ) |
3 |
4 | -- WRONG CODE |
5 | ... [ "Left Leg" ] .CFrame *CFrame( 2 , 3 , 2 ) |
The error is that you are using CFrame
, which is a table, as a function (calling it).