#Titleraw in fuction problems (Solved)

1 messages · Page 1 of 1 (latest)

karmic iris
#

Im currently trying to make a function that uses titleraw, but for some reason its the only part in the function that doesnt work. It was more complex at first but I've simplified it to titleraw @s title {"rawtext":[{"text":"aaa"}]} and yet I get nothing, but if I use the command in chat/command block it works. I know its running since I put a say hi part and it says it in chat, as well as there are also other functions in the pack that work so its just this for some reason. Anyone know how to help?

latent echo
#

It depends on how @s is being handled. If a non-player entity is running the function then it won't appear. Make sure the entity running the function is a player or use tags/scoreboards to create a selector and use @a.

atomic vault
#

A function is not a player. @s means "self", the self in this instance would be the function.

/execute as @s run function {name}
This should help you get what you are looking for.

karmic iris
#

Figured it out, Im stupid and used a old manifest version but used the new execute in the function for the titleraw 🤦‍♂️

#

I did have a execute in the function because I knew about the selector thing, but I just didnt think the execute would've been the issue