Hello, im making a custom kaioken script to my Dragon Ball Z game.
How high is the number, less is the lightemission of the kaioken aura.
But the Textbox doesn’t change the Stringvalue’s value and i dont know why
Can you help me with it please?
local Textbox = script.Parent.Parent.kaiomult
script.Parent.Value.Value = Textbox.Text
local val = script.Parent.Value.Value
local kaio = val * 0.05
local auras = game.ReplicatedStorage.MorphObjects.Auras.kaiokentechnique.LightEmission
game.ReplicatedStorage.MorphObjects.Auras.kaiokentechnique.LightEmission = auras - kaio
Focus lost runs when the player stops focusing on the textbox(meaning that their mouse clicked outside of the textbox). Your code only works when the player clicked the textbox, and it won’t update because you only changed the value when they clicked the textbox, which doesn’t have text in it yet.
There could be a potential problem with this, and anywhere else you use it. Because the script could be getting confused with .Value.Value, as it’s the way to find the value of an object, and it seems the name of one of them. So I’d say change the name to something else to make sure it’s not messing it up.
Could you perhaps show us a screenshot of the explorer where the script and all of that is?
And are those print()'s showing up in the output when you click whatever “script.Parent” is? (I assume it’s a button, as you’re using MouseButton1Click) To see if the problem is with the Touched event or with what’s inside it.