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

How would I make an auto equipped weapon?

Asked by
xEiffel 280 Moderation Voter
7 years ago
Edited 7 years ago

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))

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 JazzyUnder 18 — 7y

2 answers

Log in to vote
2
Answered by 7 years ago
Edited 7 years ago

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

0
Thanks, Accepted and Upvoted! xEiffel 280 — 7y
0
Thank you, glad to hear it worked out for you! superwar55 48 — 7y
Ad
Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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

Answer this question