So If I understand correctly, you want to make a script that triggers makes an energy punch. When does the player ‘energy punch’? Do they punch when they reach a certain energy level? Or do they punch when they click a button and then the script checks what kind of energy punch the player does. Currently your script only makes one energy punch when the player joins the game and that’s it.
There are also a few problems with your current script.
if strength >= 100 and strength < 1000 < 10000 then
punchModelName = "EnergyPunchRed" -- Update this to the appropriate asset name for the red ball
elseif strength >= 1000 then
elseif strength >= 10000 then
punchModelName = "EnergyPunchBlue" -- Update this to the appropriate asset name for the blue ball
end
This should probably be
if strength >= 100 and strength < 1000 then
punchModelName = "EnergyPunchRed" -- Update this to the appropriate asset name for the red ball
elseif strength >= 1000 and strength < 10000 then -- Whatever color you want this range to be in
punchModel = "EnergyPunchColor"
elseif strength >= 10000 then
punchModelName = "EnergyPunchBlue" -- Update this to the appropriate asset name for the blue ball
end
In your edited post you also repeat the same code twice which is unnecessary
This line
local punch = game.ServerStorage.Powers[punchModelName]:Clone()
doesn’t work. This I assume a LocalScript inside I assume StartePlayerScripts. If this is a Localscript, then this code runs on the client, which cannot access the server. ServerStorage, as the name implies, only exists on the server, so the client cannot see it. If you don’t know the difference, you should research it.