Advertisement
fornakter

Drop other item

Jun 29th, 2024
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local dropEvent = ReplicatedStorage:WaitForChild("DropEvent")
  3.  
  4. dropEvent.OnServerEvent:Connect(function(player)
  5.     local playerModel = game.Workspace:FindFirstChild(player.Name)
  6.     if playerModel then
  7.         local tool = playerModel:FindFirstChildOfClass("Tool") -- tool name
  8.         if tool then
  9.             tool.Parent = game.Workspace
  10.             tool.Handle.CFrame = playerModel.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
  11.         end
  12.     end
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement