#i want to make a menu screen. but it just wont show the background and camera. it's pissing me off.

1 messages · Page 1 of 1 (latest)

lofty inlet
#

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local gui = script.Parent

if not player then return end

local cam = workspace.CurrentCamera
repeat task.wait() cam = workspace.CurrentCamera until cam

local camPart = workspace:FindFirstChild("MenuCam") or workspace:WaitForChild("MenuCam", 10)
if not camPart then return end

local playButton = gui:FindFirstChild("PlayButton", true) or gui:FindFirstChildWhichIsA("TextButton", true)
if not playButton then return end

gui.Enabled = true

local running = true
local camConn = RunService.RenderStepped:Connect(function()
if not running then return end
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = camPart.CFrame
end)

playButton.MouseButton1Click:Connect(function()
if not running then return end
running = false

if camConn then
    camConn:Disconnect()
    camConn = nil
end

local char = player.Character
if char and char:FindFirstChild("HumanoidRootPart") then
    local hrp = char.HumanoidRootPart
    local offset = hrp.CFrame.LookVector * -6 + Vector3.new(0, 3, 0)
    local targetCFrame = CFrame.new(hrp.Position + offset, hrp.Position)
    local duration = 0.6
    local steps = math.max(1, math.floor(duration / (1/60)))
    local start = cam.CFrame
    for i = 1, steps do
        local alpha = i / steps
        cam.CFrame = start:Lerp(targetCFrame, alpha)
        task.wait(1/60)
    end
end

if not player.Character or not player.Character.Parent then
    player:LoadCharacter()
end

cam.CameraType = Enum.CameraType.Custom
local char2 = player.Character or player.CharacterAdded:Wait()
local humanoid = char2 and char2:FindFirstChildOfClass("Humanoid")
if humanoid then
    cam.CameraSubject = humanoid
end

gui.Enabled = false

end)

#

I'm tired of this, i'm always trying to make a roblox game but i always fail

I don't know why life is doing this to me but i hate it for this

I always have an idea to make for a game, but it always takes scripting, which i hate

I make these scripts but they dont even work. it's so annoying

i watch so many tutorials, use free models but they just dont work

Now i actually try to make a game and look. nothing seems to work

#

and whenever i try to post on dev forum. but it always needs some requirement and i hate it for that

#

please help me achieve my dreams because it's absolute bullshit

gray vault
#

is the button and guis active

#

like is the input going through?

lofty inlet
#

yes i see the buttons and stuff

#

but they dont work

#

scripting sucks

#

these stupid tutorials on youtube dont even work for no reason

#

and i dont know what's causing this

#

the camera doesnt show because the camera part keeps being deleted from the workspace

carmine granite
lofty inlet
#

shut up, i'm actually determined to make a roblox game

#

i was determined until these dumb scripts just dont even work

#

even when precisely written