Trying to make players team change server side?
So basically what I am trying to do is to make my Local Team changer to change the players team color in server side so it appears to other players I have already made a remote event in my game I am just confused about how to script it so it fires the players team color so the players team can happen in the server. I am a Semi Medium level scripter so I need some learning to do. My Local Script works good but I want to make the players team appear on the server side. If you are confused just reply on why you are confused.
Here is the script btw
01 | script.Parent.Enabled = true |
02 | local P = game.Players.LocalPlayer |
04 | local Dbutton = script.Parent.background.deploy |
05 | local text = script.Parent.background.teamselected |
06 | local teamchanged = game.ReplicatedStorage.Teamevents.TeamChanged |
07 | Dbutton.Visible = false |
09 | P.TeamColor = game.Teams [ "Special Emergency Forces" ] .TeamColor |
10 | text.Text = "Special Emergency Forces" |
11 | Dbutton.Visible = true |
14 | script.Parent.background.sef.MouseButton 1 Click:Connect(SEF) |
16 | P.TeamColor = game.Teams [ "Red Bacon Navy" ] .TeamColor |
17 | text.Text = "Red Bacon Navy" |
18 | Dbutton.Visible = true |
21 | script.Parent.background.rbn.MouseButton 1 Click:Connect(RBN) |
23 | P.TeamColor = game.Teams [ "Red Bacon Army" ] .TeamColor |
24 | text.Text = "Red Bacon Army" |
25 | Dbutton.Visible = true |
26 | teamchanged:FireServer() |
28 | script.Parent.background.RBA.MouseButton 1 Click:Connect(RBA) |
30 | P.TeamColor = game.Teams [ "Military police" ] .TeamColor |
31 | text.Text = 'Moderation Depratment' |
32 | Dbutton.Visible = true |
35 | script.Parent.background.MP.MouseButton 1 Click:Connect(MP) |
37 | P.TeamColor = game.Teams [ "Imperalist Bloxburg" ] .TeamColor |
38 | text.Text = 'Imperalist Bloxburg' |
39 | Dbutton.Visible = true |
42 | script.Parent.background.IB.MouseButton 1 Click:Connect(IB) |
44 | P.TeamColor = game.Teams [ "Experimental Operations" ] .TeamColor |
45 | text.Text = 'Experimental Operations' |
46 | Dbutton.Visible = true |
49 | script.Parent.background.eo.MouseButton 1 Click:Connect(EO) |
52 | script.Parent.Enabled = false |
53 | script.Parent.Parent.MenuGui.Enabled = true |
54 | P.Character.Humanoid.Health = 0 |
55 | Dbutton.Visible = false |
58 | Dbutton.MouseButton 1 Click:Connect(Deploy) |