Roblox Studio Projectile System

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 43

  • @Slavik_HOI4
    @Slavik_HOI4 11 месяцев назад +21

    this video made me realise how unoptimized my scripting is lmao

    • @keyblademaster8263
      @keyblademaster8263 10 месяцев назад +6

      Keep watching his videos fam this guy is legit

  • @Ashmoudai
    @Ashmoudai 11 месяцев назад +3

    Great tutorials. All your videos have been expanding how I think about the client server model and how to work with it effectively.

  • @ShortyJustin
    @ShortyJustin 11 месяцев назад +1

    You did exactly what I tried to do on my own. Perfect video!!

  • @Wurfeln
    @Wurfeln 11 месяцев назад +6

    Hey, Can you give us more real life example of your "How to use module scripts right" video? Like how you would approach things by maybe remaking popular game genres or a whole rescripting of an old roblox game

    • @cenn2
      @cenn2 11 месяцев назад +2

      Exactly what a lot of devs need (includig myself)

    • @goodpuffs
      @goodpuffs 10 месяцев назад +1

      No more R2D...

  • @SmallBallMoney
    @SmallBallMoney 11 месяцев назад +5

    Fantastic stuff. How did you learn to be so organized?

    • @qweekertom
      @qweekertom  11 месяцев назад +5

      Thanks! I’ve learned to be organized over time. Like anything you fall into habit over time, so I’ve slowly started to develop my own layouts and templates for organizing everything. The key is to find what works best for you!

    • @donutring6007
      @donutring6007 6 месяцев назад

      ​@@qweekertomhow long have you been coding in roblox studio?

  • @shinjitarosoul
    @shinjitarosoul 13 дней назад

    Amazing tutorial

  • @HarryTheDev
    @HarryTheDev 4 месяца назад

    I just learned so much about roblox studio

  • @ricketycode
    @ricketycode 10 месяцев назад +1

    Can you explain what your doing? Might be longer but i'm here to learn not watch a timelapse to copy and paste.

  • @atomiic39
    @atomiic39 4 месяца назад

    finally a good lua youtuber

  • @sokiuwu
    @sokiuwu 11 месяцев назад

    Hey great video! ❤❤❤ Would you mind doing a video on how OOP works in Lua? Even something like how the *self* magic in your component system works will do :3

  • @Smurfis
    @Smurfis 5 месяцев назад

    Thanks for this was actually struggling with incorporating this system almost precisely into my game.
    Will really help me in terms of replication from server to client as well, how would you cope with a somewhat large amount of parts doing something like this?

  • @nickz1479
    @nickz1479 3 месяца назад +1

    the problem with this is single raycasting doesn't quite work if your projectile has a large size, it would look weird

    • @HarryTheDev
      @HarryTheDev 2 месяца назад

      did you find a workaround for this

    • @Elite_CMDO
      @Elite_CMDO 2 месяца назад

      Shapecasts

    • @HarryTheDev
      @HarryTheDev 2 месяца назад

      @ is that optimized? I’ll try it

  • @trankhanh945
    @trankhanh945 3 месяца назад

    your video is great, how can i clone the code and reference it. your video is too fast and has many parts available, i cant re-import the whole thing

  • @Chloricmass80
    @Chloricmass80 6 месяцев назад

    Hi, I'm not sure if you're checking comments on this video anymore, but I'm a bit confused.
    Making my own projectile system, I've tried to implement the counter-latency logic by getting the network lag, similar to your way.
    I was unable to do this. os.time() returns a whole number, representing the UNIX time. A float is required to get the network lag, not a whole number, so I couldn't use this method, so I'm not sure if this actually even did anything in your script (the network lag would almost always be 0 using this.)
    So I turned to tick(), which does the same thing, except it does return a float. This also didn't work, Roblox has some inconsistencies with the tick() function where some Windows devices would return a phenomenally low number (Something like around an hour after January 1, 1970.) So I was unable to use that as well.
    So I decided to remove that part of the script altogether, if you know a way to get around this, or you did get around this here and I just didn't notice, please let me know. (:

  • @ScriptifyLua
    @ScriptifyLua 11 месяцев назад +1

    Could you use Bézier curves?

  • @tomatobread7190
    @tomatobread7190 2 месяца назад

    im taking ap physics and python programming and I thought it was cool how I can kinda understand da video

  • @kindremeda1344
    @kindremeda1344 11 месяцев назад +2

    How do you get yellow comment arrows like they in your code?

    • @qweekertom
      @qweekertom  11 месяцев назад +1

      Those are called "glyphs" it's from the font I use, JetBrains Mono. It's really a "-->" but the font makes it look fancy!

  • @ShadowClaw_Dev
    @ShadowClaw_Dev 11 месяцев назад

    using parallel lua would be amazing for this!

  • @codes8300
    @codes8300 10 месяцев назад

    How about taking into account players ping?

  • @azure3218
    @azure3218 2 месяца назад

    How would I change the code for just a linear moving projectile that doesn't interact with gravity?

    • @HarryTheDev
      @HarryTheDev 2 месяца назад

      just make acceleration (0,0,0)

  • @Da_dev1
    @Da_dev1 10 месяцев назад

    Can you show your scripting setting please😢

  • @kierra4823
    @kierra4823 11 месяцев назад

    I found a major issue... sometimes the raycasts fail to work (Lets the ball go through objects) & when the velocity is set to higher (1000+) it fails 99% of the time

    • @siwachsaeoung8935
      @siwachsaeoung8935 10 месяцев назад

      there is no way to fix this unless you update the ball positon 1 by 1 it more accurate but less performance

    • @FunCodeRoblox
      @FunCodeRoblox 10 месяцев назад

      With that much velocity you don't even need RunService. Just RayCast from start position to end position and move projectile with TweenService

    • @nickz1479
      @nickz1479 3 месяца назад +1

      7 months late response, but in case if you were still wondering, you could change step projectile function to this:

      function StepProjectiles(t, dt)
      CastParams.FilterDescendantsInstances = {LocalPlayer.Character}
      for visual, projectile : SharedType.ProjectilePacket in ProjectileCache do
      local timeNow = os.time()
      local projectileInfo = Projectiles[projectile.ProjectileType]

      local steppedVelocity = projectile.Velocity + (projectile.Acceleration * dt)
      local steppedPosition = projectile.Position + (steppedVelocity * dt)

      local OG_Pos = projectile.Position

      projectile.Velocity = steppedVelocity
      projectile.Position = steppedPosition
      visual.CFrame = CFrame.new(projectile.Position, projectile.Position + projectile.Velocity)


      local castResult = workspace:Raycast(OG_Pos , projectile.Position - OG_Pos, CastParams)


      if castResult then
      ProjectileCache[visual] = nil
      HitSomething(castResult, projectile)
      visual:Destroy()
      elseif timeNow - projectile.StartTime > projectileInfo.Lifetime then
      visual:Destroy()
      end
      end
      end

    • @Masqueradix
      @Masqueradix 3 месяца назад +1

      ​@@nickz1479 it's better, not enough tho, it still goes through walls sometimes. I think it is caused by the fact that the raycast range in each runService step is so short that it sometimes doesnt register. My fix to this is to change the raycast direction to (projectile.Position - OG_Pos)*2.

  • @iilogll
    @iilogll 11 месяцев назад +1

    great tutorial

  • @jef.el_terminado
    @jef.el_terminado 10 месяцев назад

    it goes through walls

  • @vrzxon
    @vrzxon 10 месяцев назад

    does it reduce lag

  • @1dr
    @1dr 11 месяцев назад +1

    W tutorial

  • @pagnean4234
    @pagnean4234 11 месяцев назад

    If you need UI work let me know, I can show you some previous works I've done. I primarily use spring in my tweens because it is a very versatile library.

  • @elec_eco
    @elec_eco 3 месяца назад

    Types are not necessary