It’s not really difficult but here is how it’ll go:
First of course you need to have simple knowledge of ``UserInputService to detect the key being clicked for pickup.
You can just make the model picked up entirely transparent (0.5) and loop its position to the player’s LookVector or use Raycast/Camera, probably there are other choices
It is extremely recommended to mostly use CFrame for everything: rotation, position.etc
It would all come up to the simple concept of: UserInputService ---> CFrames On client input ---> Manipulate the model
For green glowing just use the instance SelectionBox and make it interact by using .Touched event to detect if part is actually hitting something
Yeah that should do it, believe this was clear on how you can make it function, hope this helped.
Alright let me get something clear before I finish off, I messed up saying .Touched it’s completely unreliable and will bug out a lot, I suggest Region3 or Raycasting
I suggest putting a value inside the part and if you can find the value with :FindFirstChild(“”) on mouse.target.Parent then you let the player go into build mode.
--// Client Sided
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Camera = workspace.CurrentCamera
local WalkKey = "E"
--// Script
game:GetService("UserInputService").InputBegan:Connect(function(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode[WalkKey] then
if Mouse.Target.Parent:FindFirstChild("Grab") then
-- Code
end
end
end)
You can detect player clicking buy using player:GetMouse() and check if the object name matches. Then use RenderStepped to update the position of the Object to the mouse’s position.