I'm trying to use this script;
local String1 = CF.TextBubble.WhatToSay local Length1 = string.len(String1.Value) for i = 1,Length1 do wait() CF.TextBubble.Text = string.sub(String1.Value,1,i)
BUT this will only function once. I want to detect if the WhatToSay Value has changed if it has then loop if it hasn't then returned.
This is what I can think of
while String1.Changed do --Code
But I'm not sure if it will work.
Any help is apperciated.
Hey BlackOrange3343,
local value = script.Parent -- Declares a variable for the value. value.Changed:Connect(function(val) -- Anonymous function using the .Changed event of the value. Notice that you do .Changed to the Object value not the Value that it holds. If I wanted to do it to the value it holds I would've done value.Value but, that doesn't have a .Changed event. print("The value has changed...") -- Prints "The value has changed..." end) -- end for the anonymous function, make sure that parenthesis is there at the end 'cause that's how anonymous functions work.
~~ KingLoneCat