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

Why does this submit details button not work?

Asked by
unmiss 337 Moderation Voter
9 years ago
local justice1 = game.Workspace.justice.SurfaceGui.Text.Text
local justice2 = game.Workspace.justice2.SurfaceGui.Text.Text
local justice3 = game.Workspace.justice3.SurfaceGui.Text.Text

local plaintiff1 = game.Workspace.hobruh.plaintiff.SurfaceGui.Text.Text
local plaintiff2 = game.Workspace.hobruh.plaintiff2.SurfaceGui.Text.Text
local plaintiff3 = game.Workspace.hobruh.plaintiff3.SurfaceGui.Text.Text

local defendant1 = game.Workspace.hobruh.defender.SurfaceGui.Text.Text
local defendant2 =  game.Workspace.hobruh.defender2.SurfaceGui.Text.Text
local defendant3 =  game.Workspace.hobruh.defender3.SurfaceGui.Text.Text

local justice = script.Parent.Parent.Justice.Text
local plaintiff = script.Parent.Parent.Prosecutor.Text
local defendant = script.Parent.Parent.Defender.Text

function SubmitDetails()
    justice1 = justice
    justice2 = justice
    justice3 = justice

    plaintiff1 = plaintiff
    plaintiff2 = plaintiff
    plaintiff3 = plaintiff

    defendant1 = defendant
    defendant2 = defendant
    defendant3 = defendant
end

script.Parent.MouseButton1Down:connect(SubmitDetails)

Button to submit what's typed in a textbox. I don't get why it doesn't work.

dont ask why its named hobruh. i got bored

if anyone ends up fixing this, is there a way to get the player who submitted it, and put it in a hint since i don't want this again: http://prntscr.com/79rua6

1 answer

Log in to vote
0
Answered by
unmiss 337 Moderation Voter
9 years ago

Maybe it's because I'm stupid, but I got a response on ROBLOX quicker. Many times that I post here, someone else has given me the answer already or my dumb self has figured it out :(

I should assign the .Text in the function, but not the variable. also, the person who responded to me on roblox forum's name is "amanda". nice.

http://www.roblox.com/Forum/ShowPost.aspx?PostID=163061026

i can't mark my own answer as the correct answer, haha. mod can close this if they want.

0
just delete the question ImageLabel 1541 — 9y
0
Since you have so Many Variable it would be more efficient to use tables to access them UserOnly20Characters 890 — 9y
Ad

Answer this question