I'm working on a game, but I need something to change a string value when you touch a part I've tried many times, but it does not work here is my script:
oof = game.ReplicatedStorage.Markers.Bank.Config.BurstType
script.Parent.Touched:Connect(function()
oof.Value.new = police
end)

19 comments
Value.new is not a thing
it should be oof.Value = police not Value.new
thanks I'm going to see if it works
it does not work
ok, first of all, what is police?
if it is on police, an alarm will sound
that doesn't answer my question, I'm asking what it is not what it does
normally the value is set to none
Change police to "police" or 'police'. That turns the text into a string.
^
yes
if police wasn't a string then you would be getting an error about assigning nil to a string value, the value being oof.Value
ok
It does not matter to me anymore that there is something wrong with the police. I just want the value to change when I touch a part
if police is not a variable, and if it is, if it's not a string variable, you should use what others said: oof.Value = "police"
ok
string variable is e.g local a = "string"
thank you very much it works
Edit the question and write [SOLVED] at the beginning of the question.