TextBox's Visible Property not being changed by LocalScript

I want to change the TextBox in a localscript using the arguments passed by the serverscript, however the TextBox is still visible when the property is being changed

Arguments:

	local arguements = {false, game.StarterGui.ScreenGui.TextInput}

LocalScript Listener:

GuiDissapear.OnClientEvent:Connect(function(arguements)
	arguements[2].Visible = arguements[1]
	
end)

use PlayerGui or reset the character by every change.
change playergui in a localscript

Sorry but I’m not sure how resetting the character is going to solve the issue, and I’m not sure what changing playergui in a localscript means.

Can you kindly rephrase your answer, thanks :smiley:

PlayerGui (Child of player) is what the player sees
StarterGui (Service) is only replicated when the character respawns
only a localscript should change in playergui

Thanks! Your solution worked, however, I’m still not completely sure as to why my code didn’t work in the first place.

If I state the TextBox directly like this:

local TextInput = script.Parent.TextInput
GuiDissapear.OnClientEvent:Connect(function(arguements)
	TextInput.Visible = arguements[1]
	
end)

The code works fine and the TextBox disappears.