Placement System with Prediction Blocks

I want to create a placement system similar to roblox islands or roblox skywars with prediction blocks and having the block move 3x3x3 studs with collission detection similar to roblox islands
I have made a placement system but I’m really confused on making it. I’ve tried to see devforum posts but I wasn’t able to make anything. I’m really curious on how you can also stop it from getting out of the player’s magnitude
Screenshots:

My placement system features only you being able to tap on a block with is 3x3x3 studs. image

2 Likes

Is this close to what you are looking for?

I don’t really understand what happens in the video.

It’s a placement system with a prediction?

I posted my screenshot above ^

Yeah well, the prediction system has to be done on a client side and when player declares specific prediction it should send a placement to the server to create this change.

I’ve never played that before. Can you be more specific on how this placement system works?

Edit: Do you mean so the blocks can float?

I’m really just curious if there is an explanation or example of how this would work.

This is what @Xemptia is looking for:

Video taken from :crossed_swords: SKYWARS :bow_and_arrow:

Yeah this is what I’m looking for ^ On how this would exactly work. Example By CreepySins: https://gyazo.com/e16d694a07525b2241b95b4210ab69b9

@ArticGamerTV Do you know how this would work out?

It seems like it takes the direction the mouse is pointing and then casts a ray towards the nearest part. Depending on which face of the part the ray hits, it makes a bunch of clones in a certain direction. You could use the look vector of the part the ray hit to determine the precise direction you need to go.

The one issue with my theory is the mouse appears to be hovering over nothing, and I’m pretty sure that affects its CFrame. My way is probably not the best way, but for each part placed, I’d have an invisible “mouse hit detection” part surrounding it so I can read the mouse’s CFrame.

Maybe that can help you get the ball rolling?

I’ll try and test that out and see if it works thanks

1 Like

If you know you want to place it on the same plane, you can do some math to determine the point where a vector intersects a plane.

If you can find the point on the plane where the vector from the camera in the direction of the mouse (ViewportPointToRay) and the plane that the other parts are on, then you can “snap” that position to the nearest grid coordinate (in this case the nearest set of 4 studs in each axis) and place it there.

Alternatively just have invisible parts around all the existing parts and when a ray hits that part you know you want to place a block there. A bit more wasteful in terms of adding lots of extra instances though.

I was thinking I could use lookVector for this due to the previous reply.

I figured it out thanks! :smiley:

After a ton of work I was able to kind of successfully replicate SkyWar’s placement system and I also added the collision,magnitude,predictions.