local l = script.Parent.Parent.Parent.Parent.Parent.leaderstats
function Click(mouse) if l.Knockouts.Value >= 5 then print"SUCCESS HAHA!" else script.Parent:remove() end end script.Parent.MouseButton1Down:connect(Click)
i don't know what i did wrong. can anyone help?
Putting in a code block for readability. (remember, highlight your code then click the Lua symbol to make code more readible.
local l = script.Parent.Parent.Parent.Parent.Parent.leaderstats function Click(mouse) if l.Knockouts.Value >= 5 then print"SUCCESS HAHA!" -- change print"SUCCESS HAHA!" to print("SUCCESS HAHA!") else script.Parent:remove() end end script.Parent.MouseButton1Down:connect(Click)
Assuming that l actually leads to something then your code is almost fine other than your print. you put in print"Success Haha!" when the correct terminology is print("Success Haha!"), you need the brackets.