How would i detect when a stringvalue value was changed?
Here is the event.
StringValue.Changed:Connect(function(NewValue)
--// Code here
end)
Resource
so lets say the sting value is the scripts parent how would i use this?
local StringValue = script.Parent
StringValue.Changed:Connect(function(NewValue)
--// Code here
end)
“Unknown global ‘NewValue’” my bad i just dont know the fix here
Maybe i gave you bad code
local StringValue = script.Parent
StringValue.Changed:Connect(function(NewValue)
--// Code here
end)
The issue here is you’ve just copied and pasted the code, without actually translating that pseudo code to real code.
You can’t use .Changed
directly. It takes a function instead. I’d recommend brushing up on some basic Lua tutorials. The help you receive from this category would be a bit more useful then.
this works ima give it a try hope it goes well been looking for a way to detect stringvalue when its changed all day
isnt that the whole point in sending code so i can copy and paste it and test it? if not then im totally wrong
Nope, point of this section is to point you in the right direction or help you solve an issue with current code. This is not a section for us to hand you code. Nevertheless some people can’t stop themselves from doing just that.
it worked perfectly thanks for the help have a great day
I just started posting on devforum not even 24 hrs ago take it easy on me.
Do you need any more help? if not can you place a solution to prevent any other response from cluttering the topic