Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
Edited by JesseSong 3 years ago

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

0
Are you doing it on a LocalScript? davidladmuta 71 — 3y
0
This causes an error because 'Frame' is not a child of 'ScreenGui' MarkedTomato 810 — 3y
0
Make sure to use a code block since it makes it easier to read code MarkedTomato 810 — 3y
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 MarkedTomato 810 — 3y
0
k thanks its works now :) totosimamora608 61 — 3y

1 answer

Log in to vote
1
Answered by
t58l 20
3 years ago

-- 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)
Ad

Answer this question