Its supposed to open a gui when a player touches the Innpart. It worked fine in studio play solo, but when in-game it doesn't work. I have a error saying that in line 2 Page is not a valid member of Frame. I checked I do have a Page inside of Frame.
local gui = script.Parent local page = gui.Page.Value local part = game.Workspace.Innpart local page2 = script.Page2.Value local Debounce = false local function onTouched() if Debounce == false and page2 == 0 then Debounce = true gui.NpcName.Text = "Inn Keeper" gui.NpcDialog.Text = "Finally...Your awake!" gui.Choice1.Text = "Where am I?" gui.Choice1.Visible = true gui.Visible = true page = 1 print "your good at scripting" wait(10) Debounce = false elseif Debounce == false and page2 == 1 then Debounce = true gui.NpcDialog.Text = "Need a room to stay?" gui.Choice1.Text = "No thanks!" gui.Choice1.Visible = true gui.Visible = true page2 = 2 print "Page2 Works" wait(10) Debounce = false end end part.Touched:connect(onTouched)
local page = gui:WaitForchild("Page") replace that line it waits for the child When using if statements use if Page.Value then Or if not Page.Value then Just an example :) that should work
If i helped please accept the answer button :3