Hey LG, any chance you could help us understand this a little better, as we want to use it on objects that are welded together, and other applications, too. But even after researching it (everywhere, api, youtube, forum, and of course tinkering with it ourselves) we can’t figure it out.
we understand the “pivot to” line, but what does ToWorldSpace do? especially in this application? I watched videos, and some of the videos said one thing, some other videos said the OPPOSITE… classic - the api doesn’t explain it.
Likewise, what’s “toeulerangles” do? Does it force the object to move on the world axis, as opposed to the objects local axis?
Certainly! Beginning of every Roblox Assistant response
ToWorldSpace basically just takes the object’s CFrame and moves it in studs based on that CFrame. (Why it’s called ToWorldSpace? Not sure, but it has to do with the complicated explanation of it) So basically, if I have a part that is facing forward and a part tilted awkwardly in every axis, and call :ToWorldSpace(CFrame.new(2,0,0)), both will move in their axis to the left two studs.
ToEulerAngles just returns a tuple (multiple variables defined at once, like when using success, error on pcall()) of the CFrame’s angles, in degrees (by default, CFrame angles are in radians). It’s pretty much the same as ToOrientation().
Hey we noticed something. If we want to put the deployable on something that has a Y rotation, it doesn’t work. How do I take the result.Instances Y rotation into account, so that the spike strip still is at 90 degrees to the character?