I would the player to be able to drop the tool just infront of themselves instead of above and away from themselves. When I set the tools CFrame in my drop script It doesn’t do anything. I can tell this because when I remove that specific line It doesn’t affect the way the item is dropped.
https://gyazo.com/5e0259d4b389044638658d9fa9376997
I have tried changing the CFrame of the handle which just move the handle alone, in this case it does drop at the players position but it just falls through the world even though It can collide with other objects
Here are my 2 scripts for Server and Client
SERVER
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("Dropped")
remoteEvent.OnServerEvent:Connect(function(player)
local humanoid = player.Character:WaitForChild("HumanoidRootPart")
if humanoid then
local items = game.ReplicatedStorage.Items
local item = player.Character:FindFirstChildWhichIsA("Tool")
local tool = item:FindFirstChild("Handle")
item.Parent = game.workspace
item.Handle.CFrame = player.Character.HumanoidRootPart.CFrame
end
end)
CLIENT
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("Dropped")
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
UserInputService.InputBegan:Connect(function(input, player)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Q then
remoteEvent:FireServer()
end
end
end)
Any solutions are much appreciated!
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.