How do i make it so that a script will wait until a value will change into something specific?
please ask an questions u have
Use the Changed
Event for Value Objects:
local Value = workspace.BoolValue
Value.Changed:Connect(function(NewValue)
--Do stuff here
end)
well, can you explain more? what kind of value? what do you want to change it to?
so basically i want to make a script that will check if a string value changed to “RocketLauncher”
and if it gets detected as “RocketLauncher” then itll execute a code
–sry its kinda hard to explain lol
StringValue.Changed
is what you need possibly
You’re able to store a string inside here, and detect if the current String is equal to “RocketLauncher” or not using the Changed
event
Would i change "the “BoolValue” to what ever or is there a step i need to take?
– could i change the path to “workspace.Weapon.Value”
Pretty much, as long as you’re able to access the Value
anywhere inside the script then you should be fine