#Random events/effects(bunny hop, low gravity, slowed speed, e.t.c

1 messages · Page 1 of 1 (latest)

hidden canopy
#

Hello, Could anyone help me? I've been trying to make it so that there are random effects every 60 seconds in my game, nothings worked so far, I also tried to add a countdown and It didn't work, anyone available to help?

eager peak
#

You could start by showing the script that's supposed to do the work

hidden canopy
urban spruceBOT
#

studio** You are now Level 1! **studio

eager peak
#

Lmao alr

versed tangle
#

You could store all of the events as functions in a module script like so:

local Events = {}
Events.BunnyHop = function()
   -- code for bunny hop
end

Events.LowGravity = function()
   -- code for low gravity
end
-- more events
return Events

Then in another script you can use a loop to start the events like so:

local Events = require(PathToModuleScript)

while task.wait(60) do
  local RandomEvent = Events[math.random(1, #Events)]
  task.spawn(RandomEvent)
end
hidden canopy
#

But the thing is, I need the codes for them. Nothings worked 😭

versed tangle
hidden canopy