If you’re running your script (which is Client script I suppose) at the start of the game, then S1 might still not exist because it’s not replicated from server yet, try using game.Workspace:WaitForChild("Shutters"):WaitForChild("S1").
I’m pretty sure WaitForChild should work, using task.wait() is very bad approach to this situation. WaitForChild basically does the same, but is more secure in case of yielding current thread.
That’s right, repeat task.wait() until instance:FindFirstChild() is not good.
The error is being thrown due to how replication works with instance streaming. @TeamDreams123 it might not be a bad idea to disable Streaming for now until you learn more about turning its benefits in your favour. (documentation) You should have no issues with what you have with no streaming.
Otherwise, adding to what Cloudy71 said, using WaitForChild() alone can still cause issues if the “shutter” is outside of the replication radius and doesn’t stream in. Using the timeout parameter of we can prevent the infinite yield and decide what to do if there is no “shutter” at the time.
This is just an example:
-- S1 will be found if it is a persistent model or if it is
-- in the replication radius
local shutters = workspace:WaitForChild("Shutters")
local S1 = shutters:WaitForChild("S1", 5)
if S1 then
-- Safe to create tweens
else
-- (S1 wasn't found, rely on signals to know
-- when it streamed in, like CollectionService:GetInstanceAddedSignal())
end