for key, value in pairs(game.Workspace.Anxiety:GetDescendants()) do
if value:IsA("BasePart") and value.Name == "Base" then
value.Touched:Connect(function(testDictionary)
testDictionary.CanCollide = false
end)
end
end
for key, value in pairs(game.Workspace.Anxiety.Modell:GetDescendants()) do
if value:IsA("BasePart") and value.Name == "Base" then
value.Touched:Connect(function(testDictionary)
testDictionary.CanCollide = false
end)
end
end
Instead, use "Code Blocks" like this one:
print("Use Code Blocks!")
And you can simply just use:
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then script.Parent.CanCollide = false end end)