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

[Question] Squad System/Party System? [closed]

Asked by 5 years ago

How can i manage to make a party system aka squad system, tried few things but didnt work ;-;

0
That's a broad question and not very explanatory. If you simply want a gui telling who you're grouped with use tables or physical folders which store which players are in group than do a for loop to create the gui. zor_os 70 — 5y

Closed as Too Broad by 1TheNoobestNoob, User#21908, and User#19524

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
zor_os 70
5 years ago

Squad Creation Script

local squad = Instance.new("Folder") -- store squad members
squad.Parent = workspace.Squads -- store all squads
squad.Name = "Squad1" -- squad name, let players or script assign it
local members = {"A","B","C","D"} -- members(use your method of finding them)
for i = 1,#members do
    local newMem = Instance.new(BoolValue,squad)
    newMem.Name = members[i]
end

Other Scripts Interactions With Squad Example

local squad = "Squad1" -- squad player belongs to
local list = workspace.Squads:FindFirstChild(squad):GetChildren() -- get squad members
for i = 1,#list do -- go through all squad members
    workspace:FindFirstChild(list[i]).Head:remove() -- execute squad
end

Script above is an example of how to find players in the squad so you can avoid them in damage scripts, exp/rewards scripts, etc.

This is a simple way to make a squad based system, you could also just tag each player then when searching through them store players with your squad tag in a table and begin script, there's many ways to go about this.

Ad