How to make item drop system like bedwars?

How do i make this type of dropping system that falls out of the player and land in front of them like in this video below. i wont respond for a few hours because i will sleep :slight_smile:

2 Likes

Is the thing you want to drop a tool or a currency or something simular?

Its supposed to drop a tool but i cant respond in a few hours bc i need to sleep :sleeping:

Do you want to make the tool drop when they press for exampel G, but the deafult keybind is Backspace if “can be dropped” property is selected.

If you want to drop the tool with costume keybind then you could do like this:

local UIS = game:GetService("UserInputService")
local Tool = script.Parent --You just need to refrance the Tool correctly
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Torso = Character:WaitForChild("Torso")

UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.G then --Change the G to whatever you want the keybind to be
     Tool.Parent = game.Workspace
     Tool.Position = Torso.Position + Vector3.new(2,0,0)
end
end)

The script might contain spelling mistakes wich you might need to correct.

its something like this but instead it drops the item from the player’s torso forward like in the video

This might work:

local UIS = game:GetService("UserInputService")
local Tool = script.Parent --You just need to refrance the Tool correctly
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Torso = Character:WaitForChild("Torso")

UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.G then --Change the G to whatever you want the keybind to be
    Tool.Parent = game.Workspace
    Tool.Position = Torso.CFrame * CFrame.new(0, 0, -5)
end
end)

Change the -5 in Tool.Position = Torso.CFrame * CFrame.new(0, 0, -5) to whatever distance you want it to drop the tool infront of the player

yeah… but its supposed to be like bedwars where it is unanchored and falls out of the player torso and lands in front of him

Sorry for late response but here is a drop script I think might help you, it is seperated to one server sided script and a local script on the tool. Local script:

local UIS = game:GetService("UserInputService")
local Tool = script.Parent --You just need to refrance the Tool correctly
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Event = game.ReplicatedStorage.DropTool

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.G then --Change the G to whatever you want the keybind to be
		local originalTool = Tool
		Event:FireServer(originalTool)
	end
end)

Add a remote event in replicated Storage
In serverScriptService add a script:

local event = game.ReplicatedStorage.DropTool

event.OnServerEvent:Connect(function(Player, originalTool)
	local newClone = originalTool:Clone()
	newClone.Parent = game.Workspace
	newClone.PrimaryPart.Position = originalTool.PrimaryPart.Position + Vector3.new(0, -1, 2)
	originalTool:Destroy()
end)
1 Like

i made it! thanks for helping :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.