Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

why does this script not print the player's PlayTime value. how can I fix this?

wassup

my script isn't working and I tried everything I could.

can anyone help me ? it's supposed to print out "Value = (number)".

I'm new to coding so any help will do. ty.

script:

show = print
plr = game.Players.LocalPlayer

if show = print then
show ("Value = " plr.leaderstats.PlayTime.Value)
end

1 answer

✓ Accepted answer

Hey there!

Try using the following code:

show = print
player = game.Players.LocalPlayer

if show = print then
show ("Value = "..player.leaderstats.PlayTime.Value) -- You need to add two dots between each statement, that's the easiest way I can explain it to you as a beginner.
end


-- Also I changed the variable "plr" to "player" to make it easier to read.

If it worked, please mark this answer as solved! Thank you!

2 comments

0

it worked tysm dude

0

Glad it worked! No problem!

This discussion is preserved as it was. New answers, comments, and votes are closed.