Proximity prompt not getting unenabled when value changed

  1. I am trying to make a ProximityPrompt Unable itself when a value changes to a certain value

  2. it doesn’t :joy:

  3. .changed

script.Parent.move.Changed:Connect(function(newValue)
	if newValue == "true" then
		script.Parent.ProximityPrompt.Enabled = false
	else
		script.Parent.ProximityPrompt.Enabled = true
	end
end)

What is your BaseValue? A boolValue? If so, remove the Quotation marks from "true", or just do this

script.Parent.move.Changed:Connect(function(newValue)
	if newValue then
		script.Parent.ProximityPrompt.Enabled = false
	else
		script.Parent.ProximityPrompt.Enabled = true
	end
end)

Intvalue, also that would not work as a solution as the new Value will be a certain value, if the value changes, it may have changed to “false” but it will take it as it was “true”

IntValues cannot store true or false, they can only store numbers, change your "true" to a number you want it to disable the prompt

1 Like