I need help with my script.


local block = script.Parent
local debounce = true

block.Touched:Connect(function(hit)
	local humanoid = hit.Parent:FindFirstChildWhichIsA('Humanoid')
	if humanoid and debounce == true then
		debounce = false
		script.Parent.block.Contrast = 100

	end
end)

I want to make a script for my game. When a player touch the block, then the Contrast should change to 100.

I know that it could be absolutly wrong but I found nothing more than this and yeah...

please help me :/ Thank you for your time

1 comment

0

Don't use a LocalScript.