#(unsolved)Round System need to add modifiers each round and objective dont know how
1 messages · Page 1 of 1 (latest)
Okay thank you
** You are now Level 2! **
send it here, so that more than one person can help out
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local INTERMISSION_TIME = 6
local ROUND_TIME = 6
local MIN_PLAYERS = 1
local function TeleportPlayers(cframe)
local players = Players:GetPlayers()
for i, player in players do
if not player.Character then continue end
player.Character:PivotTo(cframe)
end
end
--Dont touch basic stuff
local function Countdown(duration)
for i=duration, 1, -1 do
workspace:SetAttribute("Clock", i)
task.wait(1)
end
end
local function Intermission()
print("INTERMISSION")
workspace:SetAttribute("Status", "It's normal for") --the values for GUI
TeleportPlayers(workspace.SpawnLocation.CFrame * CFrame.new (0, 2, 0))
Countdown(INTERMISSION_TIME)
end
local function RunGame(map)
print("GAME BEGINS")
workspace:SetAttribute("Status", "It's random for") -- GUI VALUES
TeleportPlayers(map.Spawn.CFrame)
Countdown(ROUND_TIME)
map:Destroy()
end
--The infinite Loop for rounds
while true do
if #Players:GetPlayers() >= MIN_PLAYERS then
Intermission()
workspace:SetAttribute("Status", "Loading map")
local maps = ReplicatedStorage.Maps:GetChildren()
local randomMap = maps [math.random(#maps)]
local newMap = randomMap:Clone()
newMap.Parent = workspace
task.wait(1)
RunGame(newMap)
else--If theres no Players
print("WAITING FOR PLAYERS...")
workspace:SetAttribute("Status", "Waiting for players...")
task.wait(1)
end
end```
thank you
i’m not on my computer yet, but in about 30 minutes i can check out your code
Okay bet thank you so much
I really need help im kinda new but me and myf riend have been working a lot
we scrapped our last game
that we worked on for like 2 weeks
It wasnt a good idea, kinda quick and Was just like Oh yeah lets make that type game
now we have a good idea
and know what to do now
Also we have a shop system and when you buy the tools i Want it to save and only give the tools when in round
(unsolved)Round System need to add modifiers each round and objective dont know how
did you write this code yourself? (ai does not count, copying from tutorials does not count, and having a friend write it for you does not count. YES I HAVE TO SPECIFY)
yes i wrote some of it not all, i followed a tutorial then made the rest myself but i did the roblox scripting school and used values from a tut to help
i just need to know how to do stuff like this
so what you have here is an incredibly basic timer thing, in order to add modifiers, you first need to know what your rounds are doing and what the modifiers will do, then you need to apply those modifiers in a way that makes sense to what you're trying to do. can you be more specific about the kind of modifiers you're trying to add?
Okay, so i want to make it so each round has an objective , Right, When the round starts it chooses a random modifier to occur, I’m not sure how to make the modifier, such as, Low gravity , or Meteor shower, Or Falling anvil ETC just random, When the round ends i want the modifier to stop, each round should also choose a random objective and then the Map from the objective Folder, so each objective has its own map., also there’s a new script my friend made to Input his Shop system in so I’ll edit that with the round modifier
I can send the new script soon bc he had to incorporate his shop
so yea use a table which defines each modifier and how to start and stop them like modifiers["lowgrav"] = {start=function() end, stop=function() end} then yea the rest is very trivial. you'll need to know coding fundamentals to do it, or google some learning help on how to use tables https://create.roblox.com/docs/tutorials/fundamentals/coding-5/intro-to-dictionaries
we wont write it for you tho this is scripting-help not free-scripts.