Why does anything related to this team change not work

local LocalTextButton = script.Parent.Parent:WaitForChild("CurrentHave")
local GlobalTextButton = script.Parent
local RemotesFolder = game:GetService("ReplicatedStorage"):WaitForChild("Remotes")
local ItemUpdaterRemote = RemotesFolder:WaitForChild("ItemUpdater")
local TeamUpdaterRemote = RemotesFolder:WaitForChild("TeamUpdater")
local LocalPlayer = game:GetService("Players").LocalPlayer

	TeamUpdaterRemote.OnClientEvent:Connect(function(Team)
		print('aaaaaahhhhhhhhh')
	end)

A localscript in a screengui in startergui, the teamupdater wont print aaahh in this script, but in a localscript in starterplayerscripts it will print aaah
Any other remote works but its literally this specific function that wont work at all for no reason

Why cant you just do

local function TeamChange():()


end
LocalPlayer:GetPropertyChangedSignal("Team"):Connect(TeamChange)
TeamChange()

?

That also doesn’t work and i don’t know why, but it works in the starterplayerscripts script tho

becouse you are destroying screengui?
The script you are using seems to be very important so i suggest moving it to replicated first.

Im not destroying screengui?? From where did you get that??? It’s supposed to change the text on a gui if the player changes teams…

By default ResetOnSpawn is enabled in screen gui so you probably do

When is TeamUpdaterRemote being fired from the server? It is likely because it is being fired before the event is connected to the function.

It is fired after 15 seconds so no it isnt

Ok so why do other remotes work then?

how the hell do you structure your game?
You have to ping server from client that its ready to recive such remote first.
Dude…Just stop reinventing damn wheel

Bro wtf are you on?

.Onclientevent wont work for the teamchange in a screengui in startergui, but other .onclientevent’s in the same script work

The team change .onclientevent works in the starterplayerscripts though

Let me get this straight, your trying to change a players team from the client???

No???
safdghygrgtewqdsdhkjljhgfdac

Alright, where are you calling the event from?

From the server. My issue right now is the .onclientevent wont work, i want to detect when the team is changed, ive tried getpropertysingalchanged but none of it works in startergui for some reason

I see. Here are scripts that would work that you could implement into your code:

Server:

local RemotesFolder = game:GetService("ReplicatedStorage"):WaitForChild("Remotes")
local TeamUpdaterRemote = RemotesFolder:WaitForChild("TeamUpdater")

game.Players.PlayerAdded:Connect(function(Player) -- Detect when player joins
	Player:GetPropertyChangedSignal("Team"):Connect(function() -- Detect on property changes
		TeamUpdaterRemote:FireClient(Player, Player.Team) -- And fire the client
	end)
end)

And then your current client script should work, let me know how it goes :))

That is what i was doing, it still won’t work for some reason

The folders may not load quickly enough. Here’s an updated script:

local RemotesFolder = game:GetService("ReplicatedStorage"):WaitForChild("Remotes")
local TeamUpdaterRemote = RemotesFolder:WaitForChild("TeamUpdater")

for _, i in pairs(game.Players:GetPlayers()) do
       	Player:GetPropertyChangedSignal("Team"):Connect(function() -- Detect on property changes
		TeamUpdaterRemote:FireClient(Player, Player.Team) -- And fire the client
	end)
end

game.Players.PlayerAdded:Connect(function(Player) -- Detect when player joins
	Player:GetPropertyChangedSignal("Team"):Connect(function() -- Detect on property changes
		TeamUpdaterRemote:FireClient(Player, Player.Team) -- And fire the client
	end)
end)

This script checks for all players even after everything is loaded.

It aint the issue, idk why this is happening to this specific remote, heres all im doing

local TeamUpdaterRemote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("TeamUpdater")


game:GetService("Players").PlayerAdded:Connect(function(Player)
	Player:GetPropertyChangedSignal("Team"):Connect(function()
		TeamUpdaterRemote:FireClient(Player, Player.Team)
	end)
end)

client:

local RemotesFolder = game:GetService("ReplicatedStorage"):WaitForChild("Remotes")
local TeamUpdaterRemote = RemotesFolder:WaitForChild("TeamUpdater")



TeamUpdaterRemote.OnClientEvent:Connect(function(Team)
	print('aaaaaahhhhhhhhh')
end)

(the server does detect the team changes, i put a print and it printed)

Could you tell us where you are changing the player’s team? It’s very important because if you were to change it in a localscript / on the client, the server would not detect it and therefore will not fire the remote event.
I used the exact same scripts as yours and it worked perfectly fine for me so i’m guessing this could be the problem…?