I was wondering, can you lock a Tool or Model to Player after clicking it?
I mean, i want to make a Move object System so when you hold E to a part after 1 second holding the part will come in your hands, like moving a Chair or a Table or Package, visible, big enough and you can’t use tools while having this in your hands but by pressing G you can Drop it.
you can do a local script that fires a remote event when the player presses E for the right amount and in the server you can check the distance between the player and the part, and for making the part move with the player , you could update the CFrame or position every frame, but you could also just create a weld between the player and the part that you want to move and let the engine calculate everyframe the position of the part. and later just destroy the weld from server side and set the position or CFrame for the part
for i,v in ipairs(script.Parent:GetChildren()) do
local taken = false
if v.Name == "Trash" then
while wait(0.1) do
if taken == false then
v.TakePrompt.Triggered:Connect(function(Player)
v.WeldConstraint.Part0 = v
local Plr = workspace:FindFirstChild(Player.Name)
v.WeldConstraint.Part1 = Plr.RightHand
v.PromptStorage.DropPrompt.Parent = v
v.TakePrompt.Parent = v.PromptStorage
taken = true
end)
end
if taken == true then
v.DropPrompt.Triggered:Connect(function(Player)
v.WeldConstraint.Part0 = v
local Plr = workspace:FindFirstChild(Player.Name)
v.WeldConstraint.Part1 = nil
v.PromptStorage.TakePrompt.Parent = v
v.DropPrompt.Parent = v.PromptStorage
taken = false
end)
end
end
end
end
According to ProximityPrompt this script Weld the part to the player right hand
But idk why i’m getting this error although for like 0.5 seconds everytime you take or drop the part, basically on every trigger.
This is the Explorer if you need it
When holding E ------------------------------------------------When holding G
You can set the WalkSpeed and JumpPower of the humanoid to 0 for making the player not able to move or jump and for the tools, you can temporarily take all the tools from the player’s backpack and or character and temporarily store it elsewhere.