I have a very simple script that makes a team when the player clicks a UI button, and I’m wondering how I would make the team visible on both the server and client.
code:
local teams = game:GetService("Teams")
local red = script.Parent.RedTribe
local repstorage = game:GetService("ReplicatedStorage")
local Destroy = script.Parent.TribeDestroy
local player = game.Players.LocalPlayer
local tribeval = game.Workspace.TribeValues
local wspace = game:GetService("Workspace")
red.MouseButton1Click:Connect(function()
repstorage.Teams["Red Tribe"].Parent = teams
player.Team = teams["Red Tribe"]
wspace.TribeValues.Red.Value = 1
end)
Destroy.MouseButton1Click:Connect(function()
if wspace.TribeValues.Red.Value == 1 then
teams["Red Tribe"].Parent = repstorage.Teams
wspace.TribeValues.Red.Value = 0
player.Team = teams.Neutral
else
return
end
end)
When I run this on two instances the team only shows up for the client that created it.