0

# When Touching Part Value Doesnt Change And Wait?

Edited 15 days ago

i have no idea what to title this

I'm making a script where it detects if your touching the part, if you are, it will wait a second, add 1 to everyone's value in playergui and it will wait another second then repeat. when the value reaches 60 or over. this script gets disabled. it doesnt work because of plrguicheck() and before I added plrguicheck() it didnt wait at all but then just suddenly stopped, does anyone have any ideas on how to fix it? (sorry if this doesnt make sense)

Script

local function plrgui()
for _, plr in ipairs(game:GetService('Players'):GetChildren()) do
end
end
local function plrguicheck(e)
for _, plr in ipairs(game:GetService('Players'):GetChildren()) do
end
end
script.Parent.Touched:Connect(function(hit)
local player = hit.Parent:FindFirstChild('Humanoid')
if player and plrguicheck(.Value) < 60 then
plrgui()
elseif plrguicheck(.Value) >= 60 then
script.Enabled = false
end
end)

1
Are you sure your script is correct? Line 8 is a syntax error Xapelize 2658 — 15d
0
well yeah thats what i need help with (i should of included that in the post) JmoneyPlayzOfficial 49 — 15d
0
i updated the script JmoneyPlayzOfficial 49 — 15d