Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make an auto equipped weapon?

I was wondering how I would go about doing this (Take Before the dawn for an example, When your the slasher, you have an auto equipped weapon and it doesn't appear in your inventory but you can still use it) also, how would I go about making it so it does something when you click (say a knife and once clicked it stabs (Just wondering how you'd make the click as well))

1 comment

0

I dont know how it does it but if its not in your inventory it might be attached to the player and does damage when touched or something

2 answers

✓ Accepted answer

To keep the inventory empty, maybe disable the CoreGUI for the toolbar using a localscript in startercharacterscripts so nobody can view their inventory or interact with it.

game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

Then, you could use the knife as a tool and just use the function EquipTool().

game.Players.LocalPlayer.Humanoid:EquipTool(game.StarterPack.knifarino)

For the onClick, here's a place with all the scripts and explanations that are better than mine. http://wiki.roblox.com/index.php?title=Tools

2 comments

0

Thanks, Accepted and Upvoted!

0

Thank you, glad to hear it worked out for you!

Just drag the tool into StarterPack

about the click thing try:

local function onClicked()
	--ur script
end
script.Parent.MouseButton1Click:connect(onClicked)

edit: you also need animations so watch this vid: https://www.youtube.com/watch?v=ugJAzcjmS4Q

This discussion is preserved as it was. New answers, comments, and votes are closed.