Help with making a custom menu screen

Hi! I’m currently making a game where you start as a bloxy cola, and its like an infection game, so you try not to get infected by the witches brew, but i’m struggling on the loading screen, as i’m pretty new to scripting and don’t really know much about how to code stuff. I have watched all the tutorials that i could find, but they were all either free models, or not what I was looking for.

so basically, i have some animated images where i want to put the camera set on them, like a still cutscene type menu screen, and also be able to click the play button (circled in red down below), but its a part, not a gui. I would put a transparent GUI over top of it, but then it would be in different places for different devices.

I also would like to add music that stops playing when you click the play button, kind of like in bloxburg.

so to sum it up, I need some help making a camera locked onto the menu screen, and to be able to click the play button, which is a part, to play the game, and add music to the main menu :slight_smile:

- Sound System: Done! Thank you @Scrixt
- Cutscene: Done! (Figured it out by modifying a tutorial)
- Working Play Button: Still need some help

Any help is greatly appreciated. Thank you

3 Likes

Hello. I can try and help you with your problem regarding the volume after clicking the play button. I’m not the most familiar with adjusting the player camera position but you can find more info on that here.

Assuming you don’t have a sound object inside any local player position: Starter pack/Player GUI. I would use the script below:

-- Varabiles
local players = game:GetService("Players")

local buttonpart = game.Workspace:FindFirstChild("Part_Name_Here")-- **Replace This**
local clickdetector = buttonpart:FindFirstChildWhichIsA("ClickDetector") -- Make sure you have a clickdetector object inside the part to click
	  
-- Add/play sound for joining players:
players.PlayerAdded:connect(function(plr)
	wait(1) -- small wait, adjust as necessary

	plr = game.Players:FindFirstChild(plr.Name)
	local joinsound = Instance.new("Sound")
	joinsound.SoundId = "rbxassetid://261639534" -- **Replace This**
	joinsound.Parent = plr:FindFirstChild("Backpack")
	joinsound.Looped = true
	joinsound:Play()
end)

-- Stop sound once the player clicks the part/click detector:
clickdetector.MouseClick:Connect(function(plr)
	plr = game.Players:FindFirstChild(plr.Name)

	if plr then
		local joinsound = plr.Backpack:FindFirstChild("Sound")
		joinsound:Stop()
	end
end)

Hope this helps!

Thanks! The sound system works perferct :slight_smile: