Hi, I wrote a very simple script to detect when a user “finds” my noob model in a “Find The Button!” game. For some reason, it isn’t adding +1 to the value and it isn’t detecting any touch. “Debug” isn’t being printed in my function. Does anyone know why this is? No errors.
-- || SCRIPT FOR COUNTING NOOBS AND DETECTING WHEN A NOOB IS FOUND
-- < ESSENTIAL FOR THE GAME TO RUN >
-- Variables --
local player = game.Players.LocalPlayer
local level1 = workspace.level1island
local startergui = game:GetService("StarterGui")
local noobcounter = startergui.screenguis.foundamount
local noobcountervalue = noobcounter.Value
-- Stuff --
noobcounter.Text = noobcountervalue
-- Level 1 Noob Counting --
local noob1 = level1.noob1
local noob2 = level1.noob2
noob2.UpperTorso.Touched:Connect(function()
noobcounter.Value = noobcountervalue.value+1
print("Debug")
end)