Might use this someday.
Very cool!
Still having trouble doing security checks on server if anyone can help
local LookVector = placementInfo.CFrame.LookVector
local StartingRotation = math.deg(math.atan2(-LookVector.Z, LookVector.X))
local OriginalCFrame = FurnitureModel:GetPivot() -- Store the original CFrame
local NewCFrame =
FurniturePlacement:CalcPlacementCFrame(FurnitureModel, VectorRaycast.Position, math.rad(StartingRotation))
FurnitureModel:PivotTo(NewCFrame)
Still will offset slightly on server + sometimes rotates it randomly for no reason. Unsure if my StartingRotation code isn’t 100% accurate, but yeah
I also get slight changes on server placement if the surfaces ain’t top surface.
I set rotation to 0 (trying to get placement 100% correct before trying to mess with rotations) and so ye, unsure what’s causing this strange offset by like 1 whole stud?
Hello, I am sorry to revive this topic long after, but I am really struggling to find a way to make saving work with the multiple parts version. I’ve seen some people in this thread that managed to do it, but if anyone could tell me how it is achieved, I would really, really appreciate it.
Thanks
So, I tried and failed at this for many hours before posting this, and now that I did, I found an answer not too long after.
Anyways, if someone has the same problem as me, here’s how I did it : In ClientPlacement
you just need to replace placementClass.new()
with placement.fromSerialization(canvasPart, remotes.DSPlacement:InvokeServer(false, false))
It was that simple.
Very nice
You've described it brilliantlySaw this post about a year ago. Clicked off after I couldn’t understand what object oriented programming is. A year later and I’ve tried to give it another shot. I have understood oop about 60%, but still confused on many math related things such as the cframe methods you use. Soon I will master it all!
Not sure if anyone is still on this thread, but I’m just messing around with placement systems and I understand almost all of the code from the original post apart from this snippet
If someone could explain to me what exactly is going on here, It would save me a major headache and be greatly appreciated!!
Hello! is it possible to get the rbxl file from this tutorial? It would be great to take a look at the complete code and its structure, currently the complete codes are not available and it is somewhat confusing for me
There is an Uncopylocked Game linked at the end of the post.
It’s basically just handling the placement in the server so the client doesn’t have to create it themselves. The client can invoke/call methods via remote events to access the placement object
In OOP, the following concepts are defined as
- Class → Acts as a blueprint that defines the structure and behavior of objects. You can create an Object from a class // (in this case
PlacementClass
)- Object → The instances created from a class. Each object has their own independent properties and methods // (in this case
PlacementClass.new(...)
)
How would I connect Models to specific buttons and not use the “Switch” function?
It might be confusing to some players.