my game is like insanely laggy im assuming I should try to lower the activity of these scripts?
Some info about the game:
Its a pvp game and the system is kinda like this
Folder with bool values named after each attack inside the players character
getpropertychangedsignal for every bool that triggers the attack (some events also inside the getpropertychangedsignal)
all players have hitbox’s welded to there hands with scripts inside the hitbox’s that just trigger the bool value to true
theres also a custom healthbar and the health script is what has highest script activity although its a pretty simple script?
while task.wait() do
task.wait(0.095)
if script.Parent.Size.X.Scale <= 1 then
script.Parent.Size = script.Parent.Size + UDim2.new(0.001,0,0,0)
end
if script.Parent.Size.X.Scale <= 0 then
script.Parent.Size = UDim2.new(0.01,0,1,0)
---/// this script is inside the health ui in the players head so this is just going up to reference where LooseFight Bool is
script.Parent.Parent.Parent.Parent.Parent.Parent.Player.LooseFight.Value = true
end
end