button = game.Workspace.Parent.Workspace.Part

function a(hit)
	if hit == true then button.Parent.Button.Transparency = 1 button.Parent.Button.CanCollide = false
end
end

workspace.Part.Touched:connect(function()
	a()
end)

Im new to script plsHep

3 comments

1

you forgot to put hit parameter when calling a(), replace function() with function(hit) and a() with a(hit)

0

It still dont wok

1

"if hit == true" is always going to be false, "hit' is always going to be an Instance, remove that if statement