Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Preventing backspace from putting a tool back into the backpack CoreGui? [Unsolved]

Asked by 7 years ago
Edited 7 years ago

Hello, I recently posted on here about a making a FPS gun system, and how to give the player the gun.

I have got further in my progress, however I've run into a problem. I was told that the tool object was the ONLY way to get a gun or some object into a player's hands. I've stuck to using tools, however, if the player presses backspace the tool will drop.

Now before you start saying "Oh, just use the "CanBeDropped" setting and make it false." I've tried this many times, it ends up putting the tool back into backpack system.

I also attempted to make basic local script with a function that returns the tool to the player's hands:

local Tool = script.Parent

Tool.Unequipped:connect(function()
wait()
workspace.Player1.Humanoid:EquipTool(Tool)
end)

This works, but it's not what I'm trying to do. The gap between the tool being unequipped and equipped is too large. In other games such as "Battle Front 1940-1944","Phantom Forces" when I spammed the backspace button. You don't see the guns even being effected at all.

In some gun scripts I see the use of "Fake arms", are these simply for the 1st person view or do they trick the tools somehow?

I suspect it has something to do with welding the gun to the player's arm so even when they do unequip the tool. The gun model stays.

I would really appreciate any help on this subject, thanks in advance.

1 answer

Log in to vote
0
Answered by
RedCombee 585 Moderation Voter
7 years ago

All tools have a CanBeDropped property, which can be set to false. I believe this is what you're looking for.

0
Sorry, this is not what I'm looking for. I stated in the post that: "Now before you start saying "Oh, just use the "CanBeDropped" setting and make it false." I've tried this many times, it ends up putting the tool back into backpack system." So thanks for trying, but that's not what I need. Dr_Panzer 0 — 7y
Ad

Answer this question