of     1   

BobCowMan
#182619146Friday, January 29, 2016 5:20 PM GMT

Im not sure if the title makes sense. I have a script in a wall that creates a weld between the torso of a player and the wall. The torso is then rotated to look like it is running up the wall. However i do not want to change the angle of rotation for every rotational position of the wall. For example, if the wall is in the X-Y plane, it will require a different rotation than a wall in the Y-Z plane. How do i simply rotate the torso so the bottom face of the torso is facing the wall no matter the rotation of the wall? If this does not make sense let me know and i will try to clarify. Any suggestions?
BobCowMan
#182632727Friday, January 29, 2016 9:55 PM GMT

Bump any ideas?
BobCowMan
#182633967Friday, January 29, 2016 10:16 PM GMT

^
BobCowMan
#182636229Friday, January 29, 2016 10:49 PM GMT

^
Lua_Basics
#182636425Friday, January 29, 2016 10:51 PM GMT

^
BobCowMan
#182636684Friday, January 29, 2016 10:56 PM GMT

gracias
BobCowMan
#182639136Friday, January 29, 2016 11:34 PM GMT

:(
BobCowMan
#182649090Saturday, January 30, 2016 2:17 AM GMT

bump
BobCowMan
#182651395Saturday, January 30, 2016 2:55 AM GMT

someone pls
MrNicNac
#182651804Saturday, January 30, 2016 3:01 AM GMT

Ah, an interesting problem. This is my area of fun :) Rotations and other applied maths. local function TopSurfaceFace(pos, lookat, ref) ref = ref.unit local FaceVector = (lookat-pos).unit local XAxis = FaceVector:Cross(ref) local ZAxis = XAxis:Cross(FaceVector) print(ZAxis.Y) if (ZAxis.Y < 0) then print("Z less than 0") ZAxis = ZAxis * -1 XAxis = XAxis * -1 end return CFrame.new(pos.x, pos.y, pos.z, XAxis.X, FaceVector.X, ZAxis.X, XAxis.Y, FaceVector.Y, ZAxis.Y, XAxis.Z, FaceVector.Z, ZAxis.Z ) end local Wall = ? local Torso = ? local Weld = ? local BottomSurfacePointsAtWallRotation = (TopSurfaceFace(Torso.Position, (Torso.Position + (Wall.Position - Torso.Position))):toObjectSpace(Weld.Part0.CFrame)
BobCowMan
#182653828Saturday, January 30, 2016 3:37 AM GMT

@nox THANK YOU for the reply. Let's see if i can get it to work :) I'll let you know
BobCowMan
#182655715Saturday, January 30, 2016 4:08 AM GMT

Workspace.wall.Script:12: attempt to index local 'ref' (a nil value) From what it looks like the function you created has three parameters but you only feed it 2 What exactly is ref in the code you wrote?
BobCowMan
#182839440Monday, February 01, 2016 6:56 PM GMT

I suppose ill bump this since its still unsolved
BobCowMan
#182839702Monday, February 01, 2016 7:04 PM GMT

By the way, ref in nox's code is meant to be Wall.CFrame:vectorToWorldSpace(Vector3.new(0,1,0)) However it does not work properly. It makes the torso only rotate in one direction no matter the rotation of the wall. Any more ideas?
BobCowMan
#182844445Monday, February 01, 2016 9:04 PM GMT

^
BobCowMan
#182866702Tuesday, February 02, 2016 3:01 AM GMT

bump
BobCowMan
#182887500Tuesday, February 02, 2016 6:56 PM GMT

another one
MrNicNac
#182893567Tuesday, February 02, 2016 9:13 PM GMT

Your issue is a bit difficult to visualize. Could you provide a repro place or model (reproduction place/model) to view?
BobCowMan
#182945536Wednesday, February 03, 2016 9:03 PM GMT


    of     1