How to make a game like plates of fate?

I been trying to find out how to make a plates of fate game before can someone help?

2 Likes

Here is a simple starting point:

local Players = game:GetService("Players")
local Rng = Random.new()

local Fates = {
	{
		--Explode player
		MessageFormat = "%s has exploded! Oh no",
		Script = function(player)
			local character = player.Character
			if (character and character.PrimaryPart) then
				local explosion = Instance.new("Explosion")
				explosion.Position = character.PrimaryPart.Position
				explosion.Parent = character.PrimaryPart
			end
		end,
	},
	{
		--Jump player
		MessageFormat = "%s has the hops",
		Script = function(player) 
			local character = player.Character
			if (character and not character:GetAttribute("HasJumpingFate")) then
				local humanoid = character:FindFirstChildOfClass("Humanoid")
				if (humanoid) then
					coroutine.resume(coroutine.create(function()
						character:SetAttribute("HasJumpingFate", true)
						while (character and humanoid) do
							humanoid.Jump = true
							wait(2)
						end
						if (character) then
							character:SetAttribute("HasJumpingFate", false)
						end
					end))
				end
			end
		end,
	},
	--etc etc, add as many 'fates' like above as you want
}

local function ApplyRandomFate()
	--Choose random player
	local thePlayers = Players:GetPlayers()
	local numPlayers = table.getn(thePlayers)
	local chosenPlayer = thePlayers[Rng:NextInteger(1, numPlayers)]
	--Choose random fate
	local numFates = table.getn(Fates)
	local fateChosen = Fates[Rng:NextInteger(1, numFates)]
	--Apply the fate to the player
	print(string.format(fateChosen.MessageFormat, chosenPlayer.Name))
	fateChosen.Script(chosenPlayer)
end

local PlayersRequired = 1
local DelayBetweenFates = 10

while (table.getn(Players:GetPlayers()) < PlayersRequired) do
	print("Waiting for more players...")
	Players.PlayerAdded:Wait()
end

print("Starting game...")
wait(3)

while true do
	ApplyRandomFate()
	wait(DelayBetweenFates)
end
3 Likes

:smiley: :smiley: :smiley: thanks for telling me how to make one

how do you make the random plates and also how to you add fates to the plates

I would suggest looking up some tutorials on how to make a minigame game, as it has similar characteristics like round-based gameplay, points, etc. You can then modify and expand to fit the style of Plates of Fate.

I haven’t watched this so I don’t know how good it is, but from a quick search here is one tutorial series: How to make a Minigame Place - Intermission and Status Part 1 - YouTube

Tell me how to name the plates a player’s name cause idk how

for i, v in pairs(game.Workspace.Plates:GetChildren()) do
for p, b in pairs(game.Players:GetChildren()) do
v.Name = b.Name
end
end

I tried doing i,v in pairs it wont work

Assuming there is enough plates as there are players in the server, the code should be this:

local players = game:GetService("Players"):GetPlayers()
local plates = workspace:FindFirstChild("Plates")

for i, v in ipairs(plates:GetChildren()) do
	local player = players[i]
	if (player) then
		v.Name = player.Name
	end
end

You can add enough plates for the max amount of players possible in the server at once. If you want extra unused plates to be deleted, you could use this code instead:

local players = game:GetService("Players"):GetPlayers()
local plates = workspace:FindFirstChild("Plates")

for i, v in ipairs(plates:GetChildren()) do
	local player = players[i]
	if (player) then
		v.Name = player.Name
	else
		v:Destroy()
	end
end

math.Random will probably come in handy. Personally never played plates of fate but yeah

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.