local part = workspace.testpart
If I use a local script, this returns an error, can someone explain to me why?
Fyi the local script is placed correctly under starter gui.
This was working fine before
local cam = workspace:FindFirstChild("testpart")
print(cam)
This also returns nil.
DasKairo
(Cairo)
January 5, 2023, 2:37pm
#2
Infinite Yield
only happens with WaitForChild
, Are you sure this is the Correct Script? And are you sure the Item you’re looking for exists?
It returns Inf Yield if I do use waitforchild, forgot to specify that. My bad. Yes, the item I’m looking for already exists in workspace.
DasKairo
(Cairo)
January 5, 2023, 2:40pm
#4
Well, Since it’s on a LocalScript
, it is likely that it will taker a bit to load, which may be why you cant reference anything, try adding a Timeout:
local cam = workspace:WaitForChild("testpart", 10)
print(cam)
Can you try a simple loop check through workspace children?
local Workspace = workspace
for _,v in ipairs(Workspace:GetChildren()) do
print(v.Name)
end
Still returns nil. Funny thing is if I try to reference the part the part itself disappears from workspace despite there being no script that deletes parts.
The part disappears if I start the game. The part is anchored and has can collide off, it is not getting destroyed by the void.
Have you tried checking for any scripts that destroy it?
I coded everything and I can confirm that there are no scripts that has :Destroy() in it or anything that would cause this issue
Alright, one more question does the part still exist when you playtest as server? (Run)
DasKairo
(Cairo)
January 5, 2023, 2:46pm
#11
Check the Archivable
Property. Are you sure thats enabled?
If its Disabled, it will Hide the Object
Archivable
just means it can be cloned, i don’t think it’s related.
HopeGoBrr
(7dirs)
January 5, 2023, 2:47pm
#13
It does exist and archivable is on. Also as weakroblox35 said, archivable just means that it can be cloned and is somewhat irrelevant.
DasKairo
(Cairo)
January 5, 2023, 2:48pm
#14
Irrelevant? after testing with a part, it hides the object, its nowhere located in workspace
, as if it was Destroyed
HopeGoBrr
(7dirs)
January 5, 2023, 2:49pm
#15
Archivable is enabled anyways, I’m sure its not the root cause of the issue
DasKairo
(Cairo)
January 5, 2023, 2:58pm
#17
So,
I have been testing and i cant seem to replicate your error,
Are you spelling the name Correctly?
HopeGoBrr
(7dirs)
January 5, 2023, 2:59pm
#18
No idea whats causing this but interestingly enough, some parts and models are not affected by this issue. I went to an empty baseplate and it works fine, I’m still trying to figure out what the issue is. Would if be helpful if I were to send a screen recording of everything?
majdTRM
(majdTRM)
January 5, 2023, 3:03pm
#19
Can you send us screenshots of all the children/properties of the part if any?
Also would help to try and disable certain Scripts in ServerScriptService to try and find the perpetrator.
EDIT: Is StreamingEnabled turned on?
Does the same happen on a server script?
1 Like