I was making this script that checks a part if it says a certain word to see if its the word its looking for
--locals
local ClickDetector = script.Parent.ClickDetector
--actual script
local function onClick()
if workspace.sign.SurfaceGui.TextBox.Text = "9"
then
workspace.signa.SurfaceGui.TextBox.Text = "nice job"
else
workspace.signa.SurfaceGui.TextBox.Text = "bruh"
end
end
ClickDetector.MouseClick:Connect(onClick)
When I test it, it doesn’t work. Whats wrong?