I’m trying to make the Screengui disable if the player has joined before and nothing is working.!
This is what I got and nothing is happening
local PlrDisableMainFrame = game.ReplicatedStorage.PlrDisableMainFrame
game.Players.PlayerAdded:Connect(function(Player)
PlrDisableMainFrame:FireClient()
if Player.ChildRemoved then
Player.PlayerGui.Tutorial.Enabled = false
game.Players.PlayerRemoving:Connect(function(Player)
end)
end
end)
If someone can Point out What I’m doing wrong that would helpful
It look like PlayerAdded won’t fire in solo Play in studio so you have two choice here
Test in the real place (Join via roblox website)
Check the currently exist player then disable it with other function and bind PlayerAdded below (This should work on both studio and real place)
and i think this should work now
local PlrDisableMainFrame = game.ReplicatedStorage.PlrDisableMainFrame
local function DisableGui(Player)
PlrDisableMainFrame:FireClient(Player)
Player.PlayerGui.Tutorial.Enabled = false
game.Players.PlayerRemoving:Connect(function(Player)
end)
end
for _, Player in ipairs(game.Players:GetPlayers()) do
DisableGui(Player)
end
game.Players.PlayerAdded:Connect(function(Player)
DisableGui(Player)
end)