RostrumJoin Date: 2011-12-03 Post Count: 26824 |
I know almost nothing about scripting and I need help equipping tools without a Backpack.
I disabled the Backpack CoreGUI so you can't see it, therefore not letting tools put into StarterPack show up.
And that's what I want.
The only problem is, I need a weapon ALREADY EQUIPPED every time you spawn. Like, in-hand and ready to shoot. If that's not even possible, (I honestly don't know), is there a way to equip a weapon on the press of a button? (e.g. pressing Q equips it)
If you can even perform either of these, where would you put the weapon? You can't put it in StarterPack, so...
Would you put it in Lighting or something?
I need help. |
|
RostrumJoin Date: 2011-12-03 Post Count: 26824 |
I should probably mention this too:
Once the weapon is equipped, (whether on spawn or press of a button) it doesn't show up on the bottom of the screen. It doesn't have a ToolTip or a name that's visible. The only way you're able to recognize if the gun is in-hand is when you see it show up on the right side of your screen.
Also, the game is in First Person Lock. I'm sure that doesn't really effect anything but I'm going to throw it out there anyway. |
|
|
|
Ok, going to assume you are wanting to have weapon equipped on spawn?
Tools have a property of Equipped.. :D Not sure if it can be accessed through a script, but it's "Tool.Equipped"
So, the base of your script would be
local tool = game.Lighting.Tool
game.Players.PlayerAdded:connect(function(newPlayer)
newPlayer.CharacterAdded:connect(function(char) --Connect when player respawns.
tool2 = tool:Clone()
tool2.Parent = newPlayer:FindFirstChild("Backpack")
tool2.Equipped = true
end)
end)
Not sure if this would work, but that's approximately how it should look.
|
|
|
|
Phyclops: That wouldn't work because you are making the parent of the weapon as the character... Not in the players backpack.. When the player doesn't have anything in the backpack it cannot be equipped... The only way to not have a backpack visible is through disabling the coregui, afaik you can't delete the backpack itself. |
|
|
Granted I'm also not familiar with using tools. ;) So if I'm wrong, disreguard everything i have said. |
|
|
RostrumJoin Date: 2011-12-03 Post Count: 26824 |
@Phyclops
But the gun has multiple scripts in multiple categories
Do I put all of them there? If so, how would it even seperate them?
I'm a confused person and I honestly feel kind of stupid right now.
get the shotgun, i'll handle this |
|
|
Like i said, not familiar and taking a guess.. :D I know very basics of scripting, and can make almost anything happen. |
|
RostrumJoin Date: 2011-12-03 Post Count: 26824 |
Theres tons of scripts in the gun:
Local_M16
WeldScript
RecoilCount
BrickCleanup
BrickCleanup2
+
You get the point. Which one do I put inside that script?
get the shotgun, i'll handle this |
|
RostrumJoin Date: 2011-12-03 Post Count: 26824 |
^^
get the shotgun, i'll handle this |
|
|
RostrumJoin Date: 2011-12-03 Post Count: 26824 |
oh...
get the shotgun, i'll handle this |
|
|
Easy, use the starter pack folder for all tools! no backpack needed. |
|
|
|
It's so easy t equip weapons without a backpack! |
|
RostrumJoin Date: 2011-12-03 Post Count: 26824 |
So, I put that script and the name of the gun where it needed to go in the script in ServerScriptService
Now, where do I put the M16 tool? I tried in SeverScriptService and it didn't work.
I tried in Workspace and it didn't work
And in Starterpack and it didn't work
Where do I put the M16?
get the shotgun, i'll handle this |
|