The Flash Script

Hey there!

I am a big fan of “The Flash” series, movie and the superhero in general, and recently i’ve been plaing some flash games in Roblox.

So i was wondering how i could do a Flash game myself, so i did some research and this was the best i could find:

But it was very bad to script and make changes so i now want to remake it.

Does anyone know how i can do it? All i’m looking for are 3 main features:

  • Flash trail (When you run above 50 speed or so)

  • Being able to change the lightning color (Server sided)

  • Being able to run using a keybind like shift (Which is what i used in the example)

If someone could help me i would greatly appreciate it.

Thanks! :slightly_smiling_face:

Depending on how you’d wanna implement it:

  • You could use a ServerScript to detect when a Humanoid’s Walkspeed changes using the Running event, then check if it’s current speed is above 50 to Enable/Disable the trail

  • Have the client side deal with the keybinds (Shift) using UserInputService to be able to sprint, then send a RemoteEvent to change the WalkSpeed from the client, to the server

  • Not sure about the changing of the lightning color, but maybe every time you sprint it chooses a random color?

These are just my thoughts on how you could implement it

1 Like

For the colors i was thinking of just pre defined colors like red, blue, yellow.

And also how would i do the trail itself?

Edit: I’ll have to leave for some time so i might take way longer to respond you

You can let the Server Script handle the Trail Creation, and detection to disable/enable it using a CharacterAdded event (Just realized Trails require Attachments as well so you’d need to create those)

Maybe something like this would do?

local Trail = game.ReplicatedStorage.FlashTrail --The trail should have an Enabled property set to false

        local HRP = Character:WaitForChild("HumanoidRootPart")
        local Humanoid = Character:WaitForChild("Humanoid")

        local Attachment0 ="Attachment")
        Attachment.Parent = HRP

        local TrailClone = Trail:Clone()
        TrailClone.Parent = HRP
        TrailClone.Attachment0 = HRP
        TrailClone.Attachment1 = HRP

            if CurrentSpeed >= 50 then
                TrailClone.Enabled = true
                TrailClone.Enabled = false

Hey, i’ll test it all out in some minutes then i’ll respond you back, thanks!