generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: CFrame HELP

Previous Thread :: Next Thread 
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
22 Nov 2016 11:10 PM
the first part works, idk why the second part doesn't

while wait() do
for i=1,4,1 do
script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.new(0,i,0)
end
wait()
for i=1,4,1 do
script.Parent.CFrame =CFrame.new(script.Parent.Position) / CFrame.new(0,i,0)
end
end
Report Abuse
FlamedSkull is not online. FlamedSkull
Joined: 23 May 2009
Total Posts: 1379
22 Nov 2016 11:13 PM
Thats not how you'd do the second part.

Use:
for i = 4,1,-1 do
script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.new(0,i,0)
end


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
22 Nov 2016 11:14 PM
There is no / operator when it comes to CFrames, but using * returns the composition of two CFrames.

So really you just want this..

sp = script.Parent
while wait() do
for i = 1,4 do
sp.CFrame = sp.CFrame*CFrame.new(0,i,0)
end
wait()
for i = 1,4 do
sp.CFrame = sp.CFrame*CFrame.new(0,-i,0)
end
end


Report Abuse
XCVlll is not online. XCVlll
Joined: 23 Oct 2008
Total Posts: 963
22 Nov 2016 11:15 PM
alright thanks!
Report Abuse
thenoisemachine is not online. thenoisemachine
Joined: 10 Oct 2016
Total Posts: 5
22 Nov 2016 11:19 PM
while wait() do
for i=1,4,1 do
script.Parent.CFrame = CFrame.new(script.Parent.Position) * CFrame.new(0,i,0)
end

wait()
for i=1,4,1 do
local Position = script.Parent.Position
script.Parent.CFrame =CFrame.new(script.Parent.Position / Vector3.new(0,i,0))
end
end

Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image