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

How do I make people have different tools each time they spawn?

Asked by
S3C 5
10 years ago

Hello, I am working on a FPS project and everyone is by themselves but, I want them to equip different weapons each time they spawn using Lighting. Can you help me with that?

Thanks, S3C

1 answer

Log in to vote
0
Answered by 10 years ago
wait()
local plr = game.Players.LocalPlayer
repeat wait(.1) until plr.Character

local weapons = game.Lighting.Weapons:GetChildren()
weapons[math.random(1,#weapons)]:Clone().Parent = plr.Character

This might work, un-tested

NOTE: This would just give them randomized weapons, it still has a chance of picking their past weapon.

Ad

Answer this question