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

So my blocks just fall off the map,can someone help?

Asked by 10 years ago
01local enabled = true
02Player = script.Parent.Parent
03mouse = Player:GetMouse()
04run = game:GetService("RunService")
05local Left_Arm = script.Parent:FindFirstChild("Left Arm")
06local Right_Arm = script.Parent:FindFirstChild("Right Arm")
07local Core = script.Parent:FindFirstChild("Torso")
08local Left_Leg = script.Parent:FindFirstChild("Left Leg")
09local Right_Leg = script.Parent:FindFirstChild("Right Leg")
10function 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")
View all 66 lines...

and i get this error 21:59:16.900 - Players.kingalpha1.Backpack.LocalScript:49: attempt to call global 'CFrame' (a table value)

1 answer

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

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).

Ad

Answer this question