Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] plspls why; this button script not work like i want? pls fix i need for game

Asked by 3 years ago
Edited by imKirda 3 years ago
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

1
you forgot to put hit parameter when calling a(), replace function() with function(hit) and a() with a(hit) imKirda 4491 — 3y
0
It still dont wok IIIlIIlIlllI 0 — 3y
1
"if hit == true" is always going to be false, "hit' is always going to be an Instance, remove that if statement imKirda 4491 — 3y

Answer this question