#FPS Gun Loadout

17 messages · Page 1 of 1 (latest)

hot warren
#

how would I make something like this?

so, it works like this...

If Slot1's hasGun boolvalue is true and it's Selected boolvalue is true as well, then if the player picks up another tool it'll replace the one with the selected boolvalue
same goes for the Slot2

if one of the slots hasGun boolvalue is false then the tool will be in that slot rather than taking up the slot that already has the boolvalues set to True

runic peak
#

You want to detect if a value has been changed?

#

If yes. You can use the .Changed or :GetPropertyChangedSignal events

hot warren
#

hang on

#

when the player takes the Tool(gun) then it’ll replace the slot that is currently selected (basically, the slot that has the bool value set to true)

#

both of the slots are taken, and so, it replaces the slot that is currently selected by the player, which is the reason for the Selected bool value

runic peak
#

Just swap the guns from out the users backpack?

hot warren
#

right uh, and each gun has a string value named Slot, which is basically saying what slot the guns belong to

NoSlot = value of 0
Slot1 = value of 1
Slot2 = value of 2

patent moonBOT
#

studio** You are now Level 8! **studio

runic peak
#

Not on pc atm but. You can search up roblox backpack on google. To see how it works. But

Plr.Backpack:FindFirstChildWhichIsA("Tool").Parent = -- store it somewhere.```
And the same thing with grabbing the tool from somewhere and put it in
patent moonBOT
#

studio** You are now Level 1! **studio