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

studio play solo different then in-game?[SOLVED!]

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

1

@wfvj014 it's not helping me

1 answer

✓ Accepted answer

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

1 comment

0

Thank you so much :D

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