How do i make it, so it changes Player's team and respawns him on click?

script

local Storage = game:GetService("ReplicatedStorage")
local RE = Storage:WaitForChild("RemoteEvent")

RE.OnServerEvent:Connect(function(Player)
	Player.TeamColor = BrickColor.new("Mid gray")
	Player:LoadCharacter()
end)

local script

local Storage = game:GetService("ReplicatedStorage")
local RE = Storage:WaitForChild("RemoteEvent")

script.Parent.ClickDetector.MouseClick:Connect(function()
	RE:FireServer()
end)

image

theres not much to go off of here

all you added was 2 scripts and a title that barely helps us understand what you want

try this for the local script

local Storage = game:GetService("ReplicatedStorage")
local RE = Storage:WaitForChild("RemoteEvent")

script.Parent.ClickDetector.MouseButton1Click:Connect(function()
	RE:FireServer()
end)