function onTouched(hit)
if hit.Parent:FindFirstChild("Head") == nil and hit.Parent:FindFirstChild("Torso") == nil and hit.Parent:FindFirstChild("Left Arm") == nil and hit.Parent:FindFirstChild("Left Leg") == nil and hit.Parent:FindFirstChild("Right Arm") == nil and hit.Parent:FindFirstChild("Right Leg") == nil then return end
if hit.Parent.Humanoid == nil then return end
if hit.Parent:FindFirstChild("Humanoid") and game.Players:GetPlayerFromCharacter(hit.Parent) then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.PlayerGui.Cam.Disabled = false
end
--blah blah blah ... the rest of my script
script.Parent.Touched:connect(onTouched)
The script finds the PlayerGui fine and I have confirmed this, however "Cam" is a local script meant to change a player's camera position and it always says that it is not a valid member of PlayerGui. Why?

1 comment
you can't use "and" that many times