#Camera keeps delaying and sometimes wont pop up.
1 messages · Page 1 of 1 (latest)
ts is ai generated isnt it
a scripter ranker made this and he’s trying to have someone find a solution for it
hmmm i see i see
gimmie a sec
local char = player.CharacterAdded
local defCframe = camera.CFrame
function updateCamera()
camera.CFrame = game.Workspace.MainCamera.CFrame
end
local frame = script.Parent.Frame
frame.AnchorPoint = Vector2.new(0, 0)
frame.Position = UDim2.new(0.275, 0, 0.616, 0)
game:GetService('RunService').RenderStepped:Connect(updateCamera)
script.Parent.Frame.PLAY.MouseButton1Click:Connect(function()
frame:TweenPosition(UDim2.new(0.275, 0, 3, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad)
wait(0)
frame:Destroy()
script:Destroy()
end)```
I don’t think ai comments like that
local player = game.Players.LocalPlayer
local char = player.CharacterAdded
local defCframe = camera.CFrame
function updateCamera()
camera.CFrame = game.Workspace.MainCamera.CFrame
end
local frame = script.Parent.Frame
frame.AnchorPoint = Vector2.new(0, 0)
frame.Position = UDim2.new(0.275, 0, 0.616, 0)
game:GetService('RunService').RenderStepped:Connect(updateCamera)
script.Parent.Frame.PLAY.MouseButton1Click:Connect(function()
frame:TweenPosition(UDim2.new(0.275, 0, 3, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad)
wait(0)
frame:Destroy()
script:Destroy()
end)
I’ve seen a lot of ai code in here
commenting on the return is a little out of character for it
Ai codes are always well-documented
same w the Assuming you have a segment part
and have some smart brain words
I only ever see chatgpt so maybe
is this a fix?
hm?
game:GetService('RunService').RenderStepped:Connect(updateCamera)
Your running this as soon as the game starts i assume,
Instead, wait for the character to spawn/load in before running that
when i load in i can see my character, i shouldnt see it. i should see where the camera is pointing
Thats the issue, your running it too fast.
yea waiting for the character doesn’t explain it sometimes working
oh?
And also its .RenderStepped
it’s spelled right
yeah
so how should i put it?
while condition do
task.wait(.2)
end
?
shall i show you?
yes pls
what
** You are now Level 3! **
but
camera type
yeah now i know your problem
you never set the CameraType or something like that
let me check
i’m assuming he’s setting the camera cframe as part of the title screen
cameratype can be scriptable until the play button is hit
yes
but look
ima show something so crazy
did it on a baseplate
it works completely fine
but on my other game it says otherwise
local player = game.Players.LocalPlayer
local char = player.CharacterAdded
local camera = workspace.Camera
local defCframe = camera.CFrame
function updateCamera()
camera.CFrame = game.Workspace.MainCamera.CFrame
end
camera.CameraType = Enum.CameraType.Scriptable
local frame = script.Parent.Frame
frame.AnchorPoint = Vector2.new(0, 0)
frame.Position = UDim2.new(0.275, 0, 0.616, 0)
game:GetService('RunService').RenderStepped:Connect(updateCamera) -- i guess this could work?
script.Parent.Frame.PLAY.MouseButton1Click:Connect(function()
frame:TweenPosition(UDim2.new(0.275, 0, 3, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad)
camera.CameraType = Enum.CameraType.Custom
wait(0)
frame:Destroy()
script:Destroy()
end)
try this for a second
maybe i’m doing too much but should the line make sure the camera doesn’t get stuck on the title screen if you somehow hit play during physics simulation
camera.cframe = m and game.Workspace.MainCamera.CFrame
oh he ran into that issue exactly lmao
you declared m = true but never used it in that code
yeah try copy and pasting the script i sent again
MY BAD
i was gonna use
while m do
...
end
😭
a while loop isn’t necessary bc runservice is fine with changing the camera locally
i figured
this is prob the best approach since there’s no possible way to get around it if you hit play during certain frames
same issue?
actually idk i’ve never tried using this method for changing a property, only changing/declaring a variable
yes
first time it was good but just stuck on the intro model
but now its same issue
local gui = script.Parent
local frame = gui:WaitForChild("Frame")
local playButton = frame:WaitForChild("PLAY")
local mainCameraPart = workspace:WaitForChild("MainCamera")
local DCT = Enum.CameraType.Custom
local connection
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = mainCameraPart.CFrame
connection = RunService.RenderStepped:Connect(function()
camera.CFrame = mainCameraPart.CFrame
end)
frame.AnchorPoint = Vector2.new(0, 0)
frame.Position = UDim2.new(0.275, 0, 0.616, 0)
playButton.MouseButton1Click:Connect(function()
frame:TweenPosition(UDim2.new(0.275, 0, 3, 0), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 0.5, true)
task.delay(0.6, function()
if connection then connection:Disconnect() end
camera.CameraType = DCT
gui:Destroy()
end)
end)
try this
welp
i dont know how else to help you
probably another script interfering with it
so
ggs
✌️
uh
hold on
would it be the GUI menu?
because the menu is basically buttons
local object = script.Parent
object.Position = UDim2.new({-{-0.354, 0},{-4.767, 0}
object.AnchorPoint = Vector2.new({-0.354, 0},{-4.767, 0})
object.Size = UDim2.new({1.421, 0},{2.251, 0}
local newColor = Color3.fromRGB(255, 0, 0)
local oldColor = Color3.fromRGB(255, 255, 255)
local tweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local Tween = TweenService:Create(object, tweenInfo, {ImageColor3 = newColor})
local Tween2 = TweenService:Create(object, tweenInfo, {ImageColor3 = oldColor})
object.MouseEnter:Connect(function()
script.Parent:TweenPosition(UDim2.new(0.451, 0,-0.225, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
script.Parent:TweenSize(UDim2.new(0.572, 0, 1.209, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
Tween:Play()
end)
object.MouseLeave:Connect(function()
script.Parent:TweenPosition(UDim2.new(0.468, 0, -0.14, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
script.Parent:TweenSize(UDim2.new(0.53, 0, 1.024, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
Tween2:Play()
end)``` which is the title
local object = script.Parent
object.Position = UDim2.new(-{0.224, 0},{0.657, 0})
object.AnchorPoint = Vector2.new(0, 0)
object.Size = UDim2.new(0.507, 0,0.871, 0)
local newColor = Color3.fromRGB(255, 0, 0)
local oldColor = Color3.fromRGB(255, 255, 255)
local tweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
local Tween = TweenService:Create(object, tweenInfo, {ImageColor3 = newColor})
local Tween2 = TweenService:Create(object, tweenInfo, {ImageColor3 = oldColor})
object.MouseEnter:Connect(function()
script.Parent:TweenPosition(UDim2.new(-0.081, 0,-0.061, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
script.Parent:TweenSize(UDim2.new(0.55, 0, 0.988, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
Tween:Play()
end)
object.MouseLeave:Connect(function()
script.Parent:TweenPosition(UDim2.new(-0.057, 0, -0.003, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
script.Parent:TweenSize(UDim2.new(0.507, 0,0.871, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .25, true)
Tween2:Play()
end)```which is the play button
hey i redid it
and it works but
hold on ima send u what it looks like
@distant crater
weird to have the black screen first tho
ill test it in actual game
black screen
its because its just loading i assumme
but eh,,,
goodluck
i wont help any further cause im kindof
sleepy
i fixed it tho
its just the camera keeps going somewhere else then spawns on the intro
weird but its fine
ill find out someway
thank you btw
i appreciate it
** You are now Level 4! **