Jump to content

Help!!! Generating a code... *Not what you think*

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Bannana97

Bannana97

    Newbie

  • Members
  • Pip
  • 5 posts
I need help! I made forms:

VIP Name:<input type="text" /> <br />
Startup Msg: <input type="text" /> <br />
<input type="button" value="SUBMIT" />


Now, when I click SUBMIT, It will generate a code replacing the FORM1 with the VIP name form, and replacing FORM2 with the Startup Msg Form:

vip = game.Players.FORM1

msg = "FORM2" -- Leave this in the " " 's

local i = Instance.new("Message")
i.Text = msg
i.Parent = game.Workspace
function onChatted(msg, recipient, speaker)
l = msg.lower()
if msg == "hello" then
local m = Instance.new("Message")
m.Text = "Hello!"
m.Parent = game.Workspace
wait(6)
m:remove()
end

if msg == "reset" then
vip.Character:BreakJoints()
end

if msg == "exit" then
vip:remove()
end

end

vip.Chatted:connect(onChatted)

#2
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
I did not understand this actually... but you want to first access FORM1 and then access FORM2 with the same code?

#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
You mean you just want to access the values of the two textboxes from your JavaScript code?

For example, instead of this:
vip = game.Players.FORM1

You have this:

vip = NameOfForm.NameOfTextBox.value;

And so on.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums