Hello all Scripters! I’m having problems with the Weapons Kit
I need to be droppable, but when I drop the gun character’s hands and crosshair remain:
I writed a script for a drop but its not working.
1st script(in gun local script)
local ReplicatedStorage = game.ReplicatedStorage
local WeaponsSystem = ReplicatedStorage:waitForChild(“WeaponsSystem”)
local weaponModule = require(WeaponsSystem:WaitForChild(“WeaponsSystem”))
local camera = workspace.Camera
local player = game.Players.LocalPlayer
local userInput = game:GetService(“UserInputService”)
local ReplicatedStorage = game:GetService(‘ReplicatedStorage’)
local dropEvent = ReplicatedStorage:WaitForChild(‘DropEvent’)
local function drop(input, gameProcessed)
if not gameProcessed then
if input.UserInputType == Enum.UserInputType.Keyboard then
local keycode = input.KeyCode
if keycode == Enum.KeyCode.Q then
weaponModule.camera:setEnabled(false)
weaponModule.camera.rotateCharacterWithCamera = false --1st script
camera.CameraSubject = player.Character
weaponModule.normalOffset = Vector3.new(0, 0, 0)
dropEvent:FireServer()
end
end
end
end
2nd script(serverscriptservice)
dropEvent.OnServerEvent:Connect(function(player)
local playerModel = game.Workspace:FindFirstChild(player.Name)
if playerModel then
local tool = playerModel:FindFirstChildWhichIsA(‘Tool’)
if tool then
tool.Parent = game.Workspace
end
end
end)
Hope you guys can help my problem.