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

String Value wont change no matter what? no error message.

Asked by
Galicate 106
6 years ago
Edited 6 years ago

why does this not work, its in a scriptin a textbutton.

function clicked(player)
    script.Parent.Parent.ReporterName.Value = "Report1"
    script.Parent.Parent.ReportName.Value = "Report2"
end

script.Parent.MouseButton1Down:connect(clicked)
0
Is this in a LocalScript, or a Script? TheeDeathCaster 2368 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

What you are doing is right except you aren't adding Wait()

function clicked()
        script.Parent.Parent.ReporterName.Value = "Report1"
    wait(1)
     script.Parent.Parent.ReportName.Value = "Report2"
    wait(1)
end

script.Parent.MouseButton1Down:connect(clicked)
0
Why add waits? >-> TheeDeathCaster 2368 — 6y
0
aww, y do I have to explain T_T.... Probably because the value will stay at Report2, and won't change greatneil80 2647 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Check the value not all types can hold text

Answer this question