#This doesnt work im gonna go insane
1 messages · Page 1 of 1 (latest)
u gotta wait
the script is local which is run in client side
and client do not load everything instantly
but it works with other tags
it also has to do with streaming service
well i try to use game.isloaded but it doesnt work
and adding task.wait in the start of the script feels like a bad habit
u can use :GetInstanceAddedSignal(name)
so when an object load
it fire the signal
local CollectionService = game:GetService("CollectionService")
local function block_added(block)
... -- pretend code here
end
for i, block in CollectionService:GetTagged("Block") do
block_added(block)
end
CollectionService:GetInstanceAddedSignal("Block"):Connect(block_added) -- block added
@molten thicket here's an example
it'll work like you expected but without using task.wait()