Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

new is not a valid member of CFrame?

Asked by 1 year ago
Edited 1 year 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 379 — 1y

1 answer

Log in to vote
2
Answered by
Dfzoz 345 Moderation Voter
1 year 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 345 — 1y
Ad

Answer this question