Pick up block (or anything you want!) system

Hi guys, i want to introduce my new model that makes you pick something!

Setup

  • Make sure you use a click detector (or a proximity prompt if you want)

  • Create a server script in your block you want and put this script:

local ClickDetector = script.Parent.ClickDetector -- Or a proximity Prompt
local Hold = script:WaitForChild("Hold")
local RS = game:GetService("ReplicatedStorage")
local HoldTrack
local PS = game:GetService("Players")
local HoldEvent = RS:WaitForChild("HoldEvent")

ClickDetector.MouseClick:Connect(function(Player) -- If you want a proximity prompt select your proximity prompt variable, and put ".triggered".
	local LeftArm = Player.Character:WaitForChild("Left Arm")
	local Humanoid = Player.Character:WaitForChild("Humanoid")
	local Weld = Instance.new("WeldConstraint")
	HoldTrack = Humanoid:LoadAnimation(Hold)
	script.Parent.CFrame = LeftArm.CFrame + Vector3.new(0, -1.5, 0)
	ClickDetector.MaxActivationDistance = 0
	Weld.Parent = script.Parent
	Weld.Part0 = script.Parent
	Weld.Part1 = LeftArm
	HoldTrack:Play()
	script.Parent.Anchored = false
	script.Parent.CanCollide = false
	HoldEvent:FireClient(Player)
	HoldEvent.OnServerEvent:Connect(function()
		Weld:Destroy()
		script.Parent.CanCollide = true
		HoldTrack:Stop()
		ClickDetector.MaxActivationDistance = 10
	end)
end)oldEvent = RS:WaitForChild("HoldEvent")

ClickDetector.MouseClick:Connect(function(Player) -- If you want a proximity prompt select your proximity prompt variable, and put ".triggered".
	local LeftArm = Player.Character:WaitForChild("Left Arm")
	local Humanoid = Player.Character:WaitForChild("Humanoid")
	local Weld = Instance.new("WeldConstraint")
	HoldTrack = Humanoid:LoadAnimation(Hold)
	script.Parent.CFrame = LeftArm.CFrame + Vector3.new(0, -1.5, 0)
	ClickDetector.MaxActivationDistance = 0
	Weld.Parent = script.Parent
	Weld.Part0 = script.Parent
	Weld.Part1 = LeftArm
	HoldTrack:Play()
	script.Parent.Anchored = false
	script.Parent.CanCollide = false
	HoldEvent:FireClient(Player)
	HoldEvent.OnServerEvent:Connect(function()
		Weld:Destroy()
		script.Parent.CanCollide = true
		HoldTrack:Stop()
		ClickDetector.MaxActivationDistance = 10
	end)
end)
  • Make sure you have a hold animation inside the pickup script, and its name is “Hold”

  • Make sure your game is R6

  • And finally, insert a script inside starter character scripts and put this script:

local RS = game:GetService("ReplicatedStorage")
local HoldEvent = RS:WaitForChild("HoldEvent")
local UIS = game:GetService("UserInputService")
local DB = false

HoldEvent.OnClientEvent:Connect(function()
	DB = false
	UIS.InputBegan:Connect(function(input, gp)
		if gp then return end
		
		if input.KeyCode == Enum.KeyCode.E then
			if DB == false then
				DB = true
				HoldEvent:FireServer()
			end
		end
	end)
end)

Now your done!

Examples

Here’s a video of what it looks like:

Feedback

Feel free to leave your feedback!

  • Good
  • Mid
  • Bad

0 voters

11 Likes

maybe make a game with this, and uncopylock it? so that its easier to use

1 Like

Make it R15 and then it would be amazing. R6 is easier to code but R15 has less limits to what you can do. Such as more detailed animations and more body parts to work with

2 Likes

bro, i don’t like r15, also i don’t want to spend my 24 hours just changing 10239102931 animations to r15

2 Likes

It’s not just about what you want but alright…

They ain’t that hard to make. How many animations do you even have?

ehhh

i have maybe 60 animations idk, but i have way too many

For just that 1 script?

Pretty sure you can archive them to lower the list of them

nope, in the entire game bruh

what you mean

You should try making your plugins in a seperate testing place/group where there isn’t a bunch of animations

Nevermind, you can’t.

1 Like

maybe, idk but thanks, i don’t want my game to be r15

1 Like

bro i was talking on the wrong post :skull: :skull: :skull:

1 Like

can you make a game with it, and uncopylock it?

1 Like

um, ok maybe, i’m gonna do that later