I have 2 script 1.(game.StarterGui.ScreenGui.Frame.ChickenMan.Script)-change team script
`local player = script.Parent.Parent.Parent.Parent.Parent
Frame = script.Parent.Parent
local gui = game.StarterGui.ScreenGui.TeleportButton
script.Parent.MouseButton1Click:connect(function()
gui.Visible = true
player.Team = game.Teams:FindFirstChild("ChickenMan")
player.Character.Humanoid.Health = 0
Frame.Position = (UDim2.new(0.5,0,-0.5,0))
game.Workspace.Teleport.RemoteFunction:InvokeServer()
end)`
2.(game.StarterGui.ScreenGui.TeleportButton.LocalScript)- teleport script
local disabled = false
local player = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
if disabled == false then
disabled = true
script.Parent.BackgroundColor3 = Color3.new(217, 0, 0)
game.Workspace.Teleport.RemoteFunction:InvokeServer()
wait(3)
script.Parent.BackgroundColor3 = Color3.new(0, 154, 0)
disabled = false
end
end)
in first TeleportButton.visible = false
i want to set TeleportButton.visible = true in script1
but my script isn't work ,what wrong in my script
Can you help me,pls
thank

2 comments
PlayerGui / GuiObjects can't replicate to the server 'anymore'. In logic, if you want to access GuiObject in the server scripts then a ValueObject that is inserted in the server itself then it might work, but in this case; no since he/she is trying to use a 'TextButton'.
if it is a local script that is trying to access it then yes it will work, its just a server script that cant access the gui