Roblox Weapons Kit - Crosshair and Animation

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.

Why aren’t you making use of the “CanBeDropped” property shared by tool instances?

https://developer.roblox.com/en-us/api-reference/property/Tool/CanBeDropped

Anyway, here’s a local script which should reset the mouse’s cursor icon when a tool is unequipped (including dropped).

local Tool = script.Parent
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()

Tool.Unequipped:Connect(function()
	Mouse.Icon = "rbxassetid://0"
end)

The script goes inside the tool.

1 Like

Thank you! Ye, I forgot it… now only hands left