I’d suggest turning off team create if you’re the only one in the session/team. I believe the issue here is you do not publish script changes as this was recently introduced with collaborative editing. So either turn off team create or turn off collaborative editing.
Note: Before turning off team create or collaborative editing, make sure to actually publish the script changes! This button can be found in the script context menu and clicking publish chnages.
Make sure you actually commit your changes in team create! Because of collaborative editing, you need to push the code to the server. It will work only locally until then.
Oh dear. Please avoid daisy chaining your waits. Furthermore, you could simply this code so that it sets the visibility property to the opposite of its current property. Would help some.
local LocalPlayer = game:GetService("Players").LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local playerList = PlayerGui:WaitForChild("PartyGUIS").PlayerList
local function toggleList()
playerList.Visible = not playerList.Visible
end
script.Parent.MouseButton1Click:Connect(toggleList)
That aside, your code should be working. Some more details will need to be provided. For example, where is this LocalScript located? Make sure it’s located in a place where it will run. Have you ensured your changes were published? Make sure to hit Alt + P or Publish to Roblox in the file menu.
local playerlist = game.Players.LocalPlayer:WaitForChild('PlayerGui'):WaitForChild('PartyGUIS'):WaitForChild('PlayerList')
print('help')
--[[script.Parent.MouseButton1Down:Connect(function()
print('WHAT THE ACTUAL')
if playerlist.Visible == true then
playerlist.Visible = false
else
playerlist.Visible = true
end
end)]]
script.Parent.MouseButton1Click:Connect(function()
print('Hi')
if playerlist.Visible == true then
playerlist.Visible = false
else
print('SAFSDFSAFDFDAFAFD')
playerlist.Visible = true
end
end)