as you can see in the two above images, the error states that Tie S1 does not exist in an object, yet the script is not trying to recall that object.
the Script is present in “ML Switch B01-2T Crossover Right” and directs to Tie S1 via script.Parent, which is a common parent of the script and Tie S1
For WHATEVER reason, the script thinks it is trying to access “ML Switch B29 Parallel Left” despite the script only running script.Parent from “ML Switch B01-2T Crossover Right”
no scripts in this place change the parent of any object (I dont use free models or have other devs)
My brain is as broken as yours, It genuinely makes no sense!
I would report this as a platform bug but I don’t have access
and just to be sure, I did print the scripts parent, its the same as it is before play testing
I thought this too, but the script seems to have confused its own parent object. Check the output, it states Tie S1 is not a valid member of a different model the script isn’t parented to.
@BritishTrainspotting So when you printed the script’s parent on line 50, does it print ML Switch B01-2T Crossover Right?
how would re-installing studio fix the issue with the script when I dont play test in studio? Even if I was play-testing in studio I dont see how that could remotely affect the processing of scripts
Could be because your studio is outdated But likely not if other scripts are working…
Try adding it in a pcall function
local Success, errorMessage = pcall(function()
script.Parent:FindFirstChild("Tie S1"):FindFirstChild("SwitchSound")
end)
if Success then
print("Success")
end