Hey! I’m Div. I was searching for a Telekinesis script so like for example, you hold on a part left click and you can move it with your mouse. But it’s not going back. Just to the left so like when you go with your mouse to the left or to the right < with the mouse.
you could use mouse.Hit to check what part it is and all its properties so you can maybe do it where whenever mouse is clicked it check if the part is unachored you can move it by changing the part position based on mouse.Hit.p
Kk. I understand but basiclly I shoud have to use only x and y to make it like how I want it. Right? But what is if I rotate me in a direction where I have to use y and z?
Create attachment at the point you are holding create an attachment
Fire a ray from the players camera to the mouse to make sure the objects distance
Set the objects NetworkOwnerShip to the player.
Add an attachment in terrain at the point your mouse it at too.
Add a LineForce.
Everytime your mouse moves fire a raycast with the distance you got from step 2. If it hits something update the attachment in the terrain to your mouse positiion or the Hit position of the raycast IF there is onw.
Give the player some time then set the network ownership back to the server.
Basically you need to insert the Camera’s Position as the place where the raycast starts and the Mouse.Hit.Position - Camera.CFrame.Position as the direction
Network ownership is simply the way the server handles physics distribution between clients and server.
If you set the network ownership to player you can control objects that will replicate to the server via a localscript. The reason why we do this is because it is a lot more performant rather than sending a RemoteEvent everyframe from the client to the server which can really impact performance.
Usually network ownership is on the server to prevent exploiters from randomly moving objects around but since you WANT the player to move the object around NetworkOwnership is the way to do it.
I also managed to find the place I made with the spells. Ashaway Prototype - Roblox
You can use MMB and LMB to use the tools.
I might make a tutorial on Network Owneship soon actually.