So, I encountered an insanely weird and frustrating issue.
I want to make a pistol that basically follows the camera. For now I just want for it to appear in front of it.
Well, for whatever reason, it is completely invisible during playtesting.
I have zero clue why or how, but this issue does not allow me to develop my place any futher. Meshes are infact not corrupted, because this happens even with a single part.
I have to set the CFrame of the model via LocalScript, otherwise the rotation will be affected by ping, which I do not want.
I made literally the same with SpotLight when making a flashlight in the same place, and it does work.
Edit: Model is parented to StarterCharacterScripts.
I have a question: Try printing the CFrame. Sometimes absurd CFrames mess up the rendering of objects
Edit: absurd cframes as in something like CFrame.new(0,2,10,-1,-2,-2,0,1,-1,-1,0,-1)
Yeah they look absolute normal. It might just be a studio bug. for context, CFrame.new has 9 optional overflows, CFrame.new([2,2,2]Position,[1,0,0,0,1,0,0,0,1]RotationMatrix)
Instead of using LocalScript, I will use Script with ClientRunContext.
Changed the parent of the model to Workspace instead of StarterCharacterScripts.
I do think that this is a bug in studio, because parenting model to character basically makes it invisible.
Thanks for your help.
edit: Can someone post this in bug report category? I am not a regular, so I can’t.
Good to know…
I could’ve fixed it by parenting the script to ReplicatedFirst, and model to Workspace then ref the model in the script. Though I think that using Script with ClientRunContext is better.