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: TweenService is annoying the hell out of me

Previous Thread :: Next Thread 
Negativize is online. Negativize
Joined: 02 May 2011
Total Posts: 25068
02 Jun 2017 10:29 PM
So apparently when CFraming a group of objects using TweenService, every tweened part loses its Orientation (defaults back to 0, 0, 0)

This is super frustrating. Is there any way to fix this?

for _, part in pairs(workspace.StatueBase:GetChildren()) do

local pg = {
CFrame = CFrame.new(part.CFrame.X, part.CFrame.Y, part.CFrame.Z)
}

local tween = TweenService:Create(part, ti, pg)
tween:Play()

end
Report Abuse
Negativize is online. Negativize
Joined: 02 May 2011
Total Posts: 25068
03 Jun 2017 06:55 PM
Bump
Report Abuse
Negativize is online. Negativize
Joined: 02 May 2011
Total Posts: 25068
03 Jun 2017 06:58 PM
Full script:

local TweenService = game:GetService("TweenService")

local t = TweenInfo.new(
2,
Enum.EasingStyle.Quad,
Enum.EasingDirection.InOut,
0,
false,
0
)

for _, part in pairs(workspace.Statue:GetChildren()) do

local p = {
CFrame = CFrame.new(part.CFrame.X, part.CFrame.Y + 50, part.CFrame.Z)
}

local tween = TweenService:Create(part, t, p)
tween:Play()

end

Assuming the parts rotate back to (0, 0, 0) since I'm messing with CFrame.
Report Abuse
Negativize is online. Negativize
Joined: 02 May 2011
Total Posts: 25068
03 Jun 2017 07:05 PM
B
Report Abuse
Exovis is not online. Exovis
Joined: 08 Jan 2015
Total Posts: 1027
03 Jun 2017 07:08 PM
heck
i don't table but

you could just store the rotation before you tween it
then set the rotation right after u tween it
Report Abuse
Negativize is online. Negativize
Joined: 02 May 2011
Total Posts: 25068
03 Jun 2017 07:16 PM
'you could just store the rotation before you tween it
then set the rotation right after u tween it'

That actually doesn't work. And that frustrates me so damn much
Report Abuse
V0xels is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
03 Jun 2017 07:20 PM
Thats annoying
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