local door = script.Parent --//Main Event door.ClickDetector.mouseClick:connect(function() for i,v in pairs(game:GetPlayers()) do v.PlayerGui.Objectives.LockedText.Visible = true wait(5) v.PlayerGui.Objectives.LockedText.Visible = false end end)
For some reason this script doesn't work? I always get this error that says, 'GetPlayers is not a valid member of DataModel'. Can somebody please help me?
local door = script.Parent --//Main Event door.ClickDetector.mouseClick:connect(function() for i,v in pairs(game.Players:GetChildren()) do v.PlayerGui.Objectives.LockedText.Visible = true wait(5) v.PlayerGui.Objectives.LockedText.Visible = false end end)
Try this