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

new is not a valid member of CFrame?

Asked by 4 years ago
Edited 4 years ago

I'm trying to make it so when you dodge you go a certain direction, but whenever I try to run the code it keeps saying new is not a valid member of CFrame, this is the line of code that gives the error.

for i = 1,100 do    
player.Character.HumanoidRootPart.CFrame.new(player.Character.HumanoidRootPart.Position + Vector3.new(.1,0,0))
0
FYI, you need a end. BashGuy10 384 — 4y

1 answer

Log in to vote
2
Answered by
Dfzoz 489 Moderation Voter
4 years ago

CFrame.new didnt work because you tried to find a variable with it instead of creating it.

for i = 1,100 do   
2   player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position + Vector3.new(.1,0,0))
1
This should work Dfzoz 489 — 4y
Ad

Answer this question