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 » Scripting Helpers
Home Search
 

Re: Editing one bricks CFrame while moving others with it.

Previous Thread :: Next Thread 
billybobjoeybob is not online. billybobjoeybob
Joined: 18 Dec 2008
Total Posts: 364
22 Nov 2012 01:11 PM
action = 1
A = script.Parent.Parent.Door.Position.X
B = script.Parent.Parent.Door.Position.Y
C = script.Parent.Parent.Door.Position.Z
D = 0

function onClicked(playerWhoClicked)
if action == 1 then
action = 3
for i = 1, 20 do
D = D + .005
script.Parent.Parent.Door.CFrame = CFrame.new(A, B, C) * CFrame.Angles(0, D, 0)
wait(.1)
end

wait(5)

for i = 1, 20 do
D = D - .005
script.Parent.Parent.Door.CFrame = CFrame.new(A, B, C) * CFrame.Angles(0, D, 0)
wait(.1)
end

action = 1

end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)



That all rotates 1 brick (Yes I know I use to much white space). I wanted to build a door that swung outwards so I made that. How can I attach other bricks to that and make them rotate with that brick? Manuel welds didn't work, welded surfaces didn't work .... I don't quite know what to use ...
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
22 Nov 2012 01:13 PM
What you're asking for is fairly difficult... you could accomplish it with concepts such as object/world coordinates, matrix math, or trigonometry. Those are all fairly high-level concepts.

¬ SHG Scripter Tier-2 ♣ LuaLearners Elite
Report Abuse
billybobjoeybob is not online. billybobjoeybob
Joined: 18 Dec 2008
Total Posts: 364
22 Nov 2012 01:16 PM
That was my guess. I'm only in precalc, trig is a bit ahead of me. :P I was just hoping there was a special weld I didn't know about that magically solved all my problems.
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
22 Nov 2012 01:17 PM
:\ yeah we all could wish for something like that.

¬ SHG Scripter Tier-2 ♣ LuaLearners Elite
Report Abuse
billybobjoeybob is not online. billybobjoeybob
Joined: 18 Dec 2008
Total Posts: 364
22 Nov 2012 01:19 PM
I'll just stick to making one brick go up/down, left/right, forward/backwards.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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