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

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

Asked by 7 years ago
Edited 7 years ago

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)
1
@wfvj014 it's not helping me cornman601 59 — 7y

1 answer

Log in to vote
0
Answered by
Bulvyte 388 Moderation Voter
7 years ago

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

0
Thank you so much :D cornman601 59 — 7y
Ad

Answer this question