I made a script
local parts = workspace.House:GetChildren()
function onTouch(selfdestruct)
game.Workspace.house:GetChildren()
for i,v in pairs(parts) do
v.Anchored = false
end
end
I dont see any errors in output but nothing happens Please help I am very nooby at Lua roblox

6 comments
Did you add something to trigger the function?
I removed the unnecessary game.Workspace.house:GetChildren() in the function but still nothing
@JustinWe12 I added the onTouch function or I am forgetting to connect the function or something with tables
That is just the name of the function. Someone posted and answer, you can see how to properly call the function with touch event.
You didn't call the fuction
But the answers below say I called it? How can I correct this