Hello, I am currently working on making a game involving a placement script, which is like the “itty bitty city” placement script.
I can not figure out how to make the script even when I look all over youtube.
Do any of you guys know how to make the script, or have a code for the script. If so please reply to this with an answer.
There are plenty of ways to do this and there isn’t always a straightforward option to most things. The suggestion above is one I would look at. There is not really a specific script to do this and you should really read the scripting support guidelines. This isn’t really a place to request scripts, its a place to learn. When you’re stuck you can get help here but requesting scripts should be reserved to the recruitment categories.
If you’re new to scripting I wrote an article here which may help you get started: Scripting Basics - Beginner guide to lua and Roblox - #36 by hellomehappy1_Create
It explains Roblox and lua objects which are used in scripting and shows examples of how to use certain lua functionalities.
You can use RemoteEvents to take input from the player’s client. Their client can select an object type to place, and a location (cframe) to place the object. The object can contain a root part that controls location which is attached to all parts in the object. Then you can use :SetPrimaryPartCFrame() to relocate the new object. Your client can then control snapping, view models, etc.
On the server you can check that the player can afford the object and take away money (if applicable) and verify that the player is allowed to place the object and also allowed to place it in the selected location. Finally, the server can move the object to the target location.
I’d suggest googling for things if you’re stuck. For example, you could google “Roblox player mouse.”
Here are some apis that might be useful for your case: