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)

2 comments
https://scriptinghelpers.org/blog/it-works-in-studio-but-not-online
@wfvj014 it's not helping me