Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do i make a value change when i step off a part?

local touch = false

function OnTouch()
	wait(0.3)
	touch = true
	
end

script.Parent.Touched:Connect(OnTouch)

Hi, i have a part and when i touch it changes a local value 'touch' to true but i wanna add another function where when i step off the part it changes the value 'touch' to false but i have no idea how to do that. i'm really new to coding sry.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.