#Replace Lore Line

1 messages · Page 1 of 1 (latest)

iron verge
#

I want to make it so that I can loop a text (HEALTH: 456) and then check if a lore of player's tool contains the first part of the lore (HEALTH: ) and if it does, it replaces the lore of the player's tool (e.g HEALTH: 123) with HEALTH: 456, is it possible that after I check, I can find out the line of the matched lore and replace it?

wheat holly
#

what are you trying to do?

#

put a player's health into their tool's lore?

#

anyways, yes it is indeed possible

wheat holly
covert moss
#
  loop-value contains "HEALTH: "
  set {_lore} to loop-value
  replace "HEALTH: " in {_lore} with ""
wheat holly
#

Dont do it all for him

#

Now hes just gonna copy paste it and then come back and beg for a solution to his next problem

covert moss
#

Im helping more than just telling them it's possible. Most of the time all people need are an example.

wheat holly
#

I was being petty about his word choice because it seems like he hast tried himself yet

iron verge
#

I already figured it out

#

Ty for trying to help @covert moss