Needing help on doing arrest system that detects the text from textbox, and makes arrest time by a value

Hi guys! I’m trying to make system like when the text box has example. Evasion, it auto detects it and puts the prison time to 600. Anyone can help me. Thank you for reading and hope you can help me!

Which part of it are you not understanding?


So how i would make it detect the charges, and change the text to value

You kinda worded your OP a bit strange

What you could do is use a Changed Event on a NumberValue of some sort if that’s what your getting at whenever the Value gets changed?

You could make a table and their values. You could then check if the text is equal to any of the values in the table.

You could use GetPropertyChangedSignal("Text") then check the text.

local EvasionCharge = 300

   if script.Parent.Text == "Evasion" then
      TimeToServe = EvasionCharge
1 Like

Ok, how i can change the textbox value using this?