Why i can not print?

So i am trying to make a daily reward timer,and everything works,but when i try to print something like print(“JAVAKINGZ”) ,output send me this :

12:49:32.073 - ServerScriptService.ChestReward:68: attempt to call a string value

This is my script :

while true do
		local timeelapsed = TimePeriod - os.time()
		Timer.Text = "Next chest in " .. toHMS(timeelapsed) .. " seconds."
		print(toHMS(timeelapsed))
		wait(1)
	end

I am not sure what the problem is

What is toHMS? I do not understand.

It’s just Os.Time() formatting function. and nothing wrong with that.

1 Like

Btw sorry but try to use while wait() do instead of while true do.sorry for this not having anything to do with it.

But, i why i can’t print anything? like :
Print("1"),Print("2")
and more

I always put spaces between print and (“Cats767_99”) try that I might be wrong.

I DID, While wait() :

But :

12

and also why you said ‘Sorry’?.
nothing wrong with your reply,its all fine dude.

Something in your code is most likely setting print to a string. Try searching for anything does that

Idk bro I don’t do os.time() and stuff like that much unless it’s for a live event.Have you tried the scripting helpers discord or their website?
Edit: show me the whole code please there might be something in it that’s causing it to error.

I Changed the print, To Some random sentences :

But i still can not print :

1

OHHHHH DANGG, I KNOW WHAT THE PROBLEM IS, THANK YOU SO MUCH FOR HELPING ME GUYS. @Kabutey @Cats767_99 @SY8K

2 Likes

Some actually consider that to be a far worse practice, but it honestly depends on the person and whether you want it to wait before or after the code inside.

Yeaaaaahh, now everything works, this is my mistake.

What WAS the problem though?

1 Like

On line 60 their function accepted the print argument which was causing their issue, renaming it or removing it should’ve solved the problem.

1 Like

This :

1 Like