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.MouseButton1Click:Connect(function()
print("click")
script.Parent.Value.Value = Textbox.Text
print("val")
local val = script.Parent.Value.Value
local kaio = val * 0.05
local auras = game.ReplicatedStorage.MorphObjects.Auras.kaiokentechnique.LightEmission
print("val2")
game.ReplicatedStorage.MorphObjects.Auras.kaiokentechnique.LightEmission = auras - kaio
print("end")
end)
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.
local script, because it should be more intense only for that player (the other players will see the more intense aura of him but it will only work to him)
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.
Oh, okay nice! May I ask what the solution was? I’m trying to use helping others as a way to learn as well. Good to know I helped in some way though, and glad it worked out.