Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Frame is not a valid member of ScreenGui? [SOLVED]

So i want to make a script that detect if someone says something on chat but i found Frame is not a valid member of ScreenGui on Output

this is my script:

local passWord = "no" -- Set password
local LocalPlayer = game:GetService("Players").LocalPlayer

LocalPlayer.Chatted:Connect(function(msg, player)
	if msg == passWord then
		game.Players.LocalPlayer.PlayerGui.WOW.Frame = true
	end
end)

####Re-edited by JC

5 comments

0

Are you doing it on a LocalScript?

0

This causes an error because 'Frame' is not a child of 'ScreenGui'

0

Make sure to use a code block since it makes it easier to read code

0

Also at the end where it says game.Players.LocalPlayer.PlayerGui.WOW.Frame = true. Frame = true? that doesn't make sense. are you trying to make it visible? just do Frame.Visible = true

0

k thanks its works now :)

1 answer

✓ Accepted answer

-- Make sure Frame is a child of screen gui.

local passWord = "no" -- Set password 
local LocalPlayer = game:GetService("Players").LocalPlayer

LocalPlayer.Chatted:Connect(function(msg, player) 
	if msg == passWord then 
		game.Players.LocalPlayer.PlayerGui.WOW.Frame.Visible = true -- You forgot to put visible. I always do that lol
	end 
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.