Hello, everyone! I am very new to scripting and building a game on Roblox. I’m creating a horror game called “WallFright”, where you must escape a maze. Sounds simple right? Well it is, but there is a catch! There are monsters roaming around the maze, so you Gotta be careful. anyways, I tried to make it where the game waits for all players to load, since there is player dialouge, and I don’t want players that take longer to load to miss out on the dialouge, but I couldn’t figure it out. I decided I was gonna make it where when the player loads in, they are prompted with a “ready to play button” and when they click it, it will tell the game that the player is ready to play. then, once all players are ready to play, the game starts.
The problem is… I don’t know how to script any of this. I did learn the basics of scripting in Roblox, and looked up some tutorials, but the tutorial didn’t help because most of them were either outdated and didn’t work, or wouldn’t work when another script was enabled.
If you do post a reply or answer, could you include like a tutorial on how to do it? You don’t have to, but it would really help! thx for reading this post!
The problem is… I don’t know how to script any of this. I did learn the basics of scripting in Roblox, and looked up some tutorials, but the tutorial didn’t help because most of them were either outdated and didn’t work, or wouldn’t work when another script was enabled.
Make a Screengui and add a frame and a textbutton inside also add a local script inside the Frame. and place it inside StarterGui.
Place this inside the local script
local player = game:GetService(“Players”).LocalPlayer:WaitForChild(“PlayerGui”)
local YOURSCREENGUINAME = game.StarterGui.YOURSCREENGUI
local TextButtom = script.Parent.TextButton
Add a script in server script service called playerValues or if you have a leaderstats script add this in it:
game:GetService("Players").PlayerAdded:Connect(function(player)
local ready = Instance.new("BoolValue", player) --Makes a new value called ready in the player
ready.Value = false
ready.Name = "Ready"
end)
Next make a remote event in replicated storage called Ready, then add a script in ServerScriptService called ReadyScript add this in it:
local event = game.ReplicatedStorage.Ready
event.OnServerEvent:Connect(function(player, on)
player.Ready.Value = on
end)
Last thing you want to check if all the players are ready in your game script like this:
local shouldStart = false
local foundFalse = false
for _, player in pairs(game:GetService("Players"):GetChildren()) do
if player.Ready.Value and not foundFalse then
shouldStart = true
else
foundFalse = true
shouldStart = false
end
end
if shouldStart then
-- Start Game
end
Ok so the script starts working, but then an error pops up in output saying " Ready is not a valid member of Player “Players.anderdees4857743754” though I’m reading a topic on that right now.
Dude I’m going to be honest with you in the nicest way I can. You are not prepared to make this idea you have. You really need to gather some more experience and research, because what your trying to do won’t be easy, and a few alvinblox tutorials won’t provide enough knowledge to do so. If your dead set on doing it right as this moment, then as the person above said, I’d recommend hiring a scripter. Otherwise, take a month or two, and learn as much as you can. I’m sure you can make this game, just not with your current skill set.
Alirght. Yeah, this project is pretty ambitous. I think what I’m gonna do is learn more about Scritping and starting making some more basic games. thanks for the feedback!