Here's the script:
local cooldown = false
if hit.Parent:FindFirstChild("Humanoid") then
for i,v in pairs (touchedplayers) do
if not hit.Parent.Name == v and not cooldown then
cooldown = true
table.insert(touchedplayers,hit.Parent.Name)
game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui.TextLoader.UserText.Visible = true
loop()
end
end
end
end)
I want to check if the player that touched the brick isn't in a table. If it is then it would do nothing but if it's not It would add him to it and call a function. When I go ingame nothing happens when I touch it, and there isn't anything in the output.

1 comment
It worked! Thank you so much for your help! :D