How to go about making hitboxes in Roblox
Lately, I had been trying to figure out how to make a decent hitbox system for my game. My inspiration is “Item Asylum”. What I had noticed is: The hitbox doesn’t move with the player, instead multiple are created and as well as I can understand, destroyed. That’s no the tricky part, the tricky part is: making it not damage the person who activated the ability / created the hitbox.
Or, do I just make it move with the character (which will probably a worse decision since exploiters can use that to their advantage.)
How to go about making hitboxes in Roblox
Lately, I had been trying to figure out how to make a decent hitbox system for my game. My inspiration is “Item Asylum”. What I had noticed is: The hitbox doesn’t move with the player, instead multiple are created and as well as I can understand, destroyed. That’s no the tricky part, the tricky part is: making it not damage the person who activated the ability / created the hitbox.
Or, do I just make it move with the character (which will probably a worse decision since exploiters can use that to their advantage.)
Roblox Luau: ClickDetector not detecting input
For some reason my Click Detector that I had put inside of my Local Script / Script (tried both) doesn’t detect when it’s clicked on. Does anyone know what causes this?
Code:
How to Apply the Same Skin to All Players in Roblox?
I am experimenting in Roblox Studio, and I want to create a logic that would give all players the same skin. (All players must look the same during gameplay.)
Script not detecting when a player with a set ID leaves. Luau
For some reason a simple script that I wrote, that should call a function whenever a player joins, which after that checks if the players ID is one of the either.
Is there a way to detect if local players character is touching the hitbox instead of the victim? Luau
Main question for me is can I make it so that it can access the local players character from a variable given in a module script? I can’t seem to access the character of it, even though it still IS the local player and prints out local players name.
if we guess that:
module script:
Stamina bar going from 100 to 0 for no reason, Stamina value not getting any interactions
For some reason whenever I launch my experience, like a second or a half passes and the bar goes from full to empty. I also can’t make any interactions with the value. (example: whenever I try to make a if condition that if it’s equal or less than 0, then it stops doing the punches. It works, but, when I try to make an if that has the condition of it being less than a hundred, that waits for 0.2 seconds, and adds 2 to the stamina value.) If I made a repeat until it’s 100, then it just starts to increment onto it for no particular reason, no matter the condition.
Maybe someone knows the answer?
ModuleScript:
All ModuleScript variables == nil
For some reason, my local variables in the module script all seem to be nil, with no exact explanation for it, or solution.
Local Script (Stamina bar Script):
Why doesn’t my Roblox Studio print script execute correctly
For some reason, my pretty short script just refuses to print out or do anything after declaring variables, does anyone have an answer? I think it may actually be the wait for child and wait() but I don’t know, because I just started Lua.
Code:
How to type annotate a Module Script in Luau?
I’m currently making a strict type checked script but can’t find a way to type annotate a variable that requires a Module Script without using the type any
which is bad practice.