title is my error, what is wrong? it says its something in line 3...
game:GetService("Players").PlayerAdded:Connect(function(player) local Como = player.PlayerGui:FindFirstChild("Password") Como.Enabled = true game.Lighting.Blur.Enabled = true local Hobo = player.Character:FindFirstChild("Humanoid") Hobo.WalkSpeed = 0 end)
Instance:FindFirstChild()
returns the instance with the provided name if it exists, or otherwise returns nil
. In your case, your call is redundant because you do not check if it returned nil
.
GUIs cloned client-side won't replicate to the server (i.e. cloned from game.StarterGui
), so the server was unable to find your GUI.
Player.Character
is not loaded when game.Players.PlayerAdded
fires, try the Player.CharacterAdded
event like so:
game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) -- code end) end)