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

I can't figure out how to fix the Touch ended function?

script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then game.Lighting.ColorCorrection.Brightness = 0.4 game.Lighting.ColorCorrection.Contrast = 1 game.Lighting.ColorCorrection.TintColor = Color3.fromRGB(29,28,255) game.Lighting.ColorCorrection.Saturation = -1 game.Lighting.ClockTime = 6.3 end end)

script.Parent.TouchedEnded:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid")then game.Lighting.ColorCorrection.TintColor = Color3.fromRGB(0,0,0) end end)

2 comments

0

Make sure you put the script in a code block.

0

Put your code in a code blank. do this by editing your question delete the code you have then press the lua icon then put you code inside those ~~ ex: ~~~~~~~~print("Hi")~~~~~~~~~

1 answer

script.Parent.TouchEnded:Connect(function()
	print('the player is not on the part anymore')
end)

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