Hello Roblox Dev Forum community! When I was testing out a gimmick, all of a sudden stuff starts disappearing. I have tried in 3D and there is no disappearing. If anyone knows what is wrong please help. Thanks!
After multiple try’s, I cant upload the video so here are some photos
It happens right after I push the wood beam
You’re going to have to explain more clearly what the issue is, like what do you mean “2D camera” vs 3D camera? Roblox’s camera is always a 3D perspective camera. It’s not clear what you’re trying to illustrate with the screenshots either, maybe draw on them to circle what you think is doesn’t look correct?
Yup, I would like to help you too, but as @EmilyBendsSpace said, you need to be more clear about the problem.
I just see some floating cubes (right side) that disapeared and a “wood” beam in front of some characters…
When you click the beam, the cubes disapears? the 2d camera and the 3d camera is the Server Camera (that flies) and Chracter camera (that is “welded” to the character) ?
Ok I see the problem. So the pictures you see, all of them I have a 2D camera script in Starter Player Scripts. When I push the wood beam and makes impact into the water, the cubes, the beam and me start disappearing and coming back at random times. I would love to provide a video but it keeps failing to upload. Do you need more information?
Ok I see the problem. So the pictures you see, all of them I have a 2D camera script in Starter Player Scripts. When I push the wood beam and makes impact into the water, the cubes, the beam and me start disappearing and coming back at random times. I would love to provide a video but it keeps failing to upload. Do you need more information?
If your camera is far away, and the disappearing things are far from the camera, but large parts and relatively close to each other along the camera’s look axis, it might be a depth sorting issue. Still difficult to tell without video or a place file (rbxl) that reproduces the problem.
That might be the problem. Thanks!
I know it’s been years lol, but any updates on this? I’m having the same issue.
I never understood the issue back then…
OP is using a 2d client script, you too? Can you show the script?
And when using that script and “activating something” parts in map disappears?
This issue only exists in studio and will not affect the real game. Annoying but that’s what I got.
weird behaviour… I would like to reproduce it, what are the steps?
Thank you, guys for responding! Mine happens even when in the actual game not just studio. This video shows it twice, but for a split second. It usually makes the character, and a few other items go invisible for about 2 seconds.
(Camera LocalScript in StarterPlayerScripts)
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
player.CharacterAdded:Wait()
player.Character:WaitForChild("HumanoidRootPart")
camera.CameraSubject = player.Character.HumanoidRootPart
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = script.ZoomScope.Value
local RunService = game:GetService("RunService")
local function onUpdate()
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
camera.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) * CFrame.new(0,0,60)
camera.FieldOfView = script.ZoomScope.Value
end
end
RunService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onUpdate)
From what I’ve also seen, this could maybe be the culprit instead (LocalScript in StarterGui used to detect if the player is falling):
local plr = game.Players.LocalPlayer
local Char = plr.Character
local humanoid = Char:WaitForChild("Humanoid")
local hrp = Char:WaitForChild("HumanoidRootPart")
while true do
task.wait(0.1)
if hrp.Velocity.Y < 0 then
print("Falling")
script.Parent.Parent.Stats.DescendingFalling.Value = true
else
script.Parent.Parent.Stats.DescendingFalling.Value = false
end
end
It’s hard for me to test it, because it happens inconsistently. Sometimes it does it a lot, sometimes it does it a little, and sometimes it won’t even do it all.
This could also potentially be the issue(LocalScript in StarterCharacterScripts that locks the player onto the Zed-Axis):
local plr = game.Players.LocalPlayer
local char = plr.Character
local HumanoidRootPart = char.HumanoidRootPart
PosX = HumanoidRootPart.CFrame.Position.X
PosY = HumanoidRootPart.CFrame.Position.Y
PosZ = HumanoidRootPart.CFrame.Position.Z
Look = workspace.SpawnSpot.CFrame.LookVector
while true do
task.wait(1)
local oldCFrame = HumanoidRootPart.CFrame
local newPosition = Vector3.new(oldCFrame.X, oldCFrame.Y, workspace.SpawnSpot.Position.Z)
HumanoidRootPart.CFrame = oldCFrame.Rotation + newPosition
-- within Loop
end
If the last script is the cause then a simple if statement might fix it. I’m going to have to test it out
local plr = game.Players.LocalPlayer
local char = plr.Character
local HumanoidRootPart = char.HumanoidRootPart
PosX = HumanoidRootPart.CFrame.Position.X
PosY = HumanoidRootPart.CFrame.Position.Y
PosZ = HumanoidRootPart.CFrame.Position.Z
Look = workspace.SpawnSpot.CFrame.LookVector
while true do
task.wait(1)
local oldCFrame = HumanoidRootPart.CFrame
local newPosition = Vector3.new(oldCFrame.X, oldCFrame.Y, workspace.SpawnSpot.Position.Z)
if oldCFrame ~= newPosition then
HumanoidRootPart.CFrame = oldCFrame.Rotation + newPosition
-- within Loop
end
end
Edit: After testing, it still happens with this fix, so it is likely to do with the camera.
Also here is an even better example:
Set up any 2D camera, then just make anything. Add lots of stuff behind the player and add some stuff infront of the player aka add stuff farther away from the camera and add some stuff closer to the camera. You can do this with free models to save time. Then just walk around. The bug usualy activates when you collide with something.
For example, in one of my games this bug would happen in a city level, but it does not show up in the actual game. Here is a full playthrough of the game. Jump to 5:52 for the level that “has” the bug. 38:28 also has the bug sometimes in studio
Hope this helps
Yes! It happens with literally any 2-D Camera, and thank you! That game looks sick btw. Roblox really needs to look into this though, it’s very discouraging for 2-D development on the platform.