Your answer is quite simple!
Firstly, you'll want to find a way to convert your value into something more feasible. There are several ways to do this, but I recommend first converting the number into a string. You can do so like this:
local tostr = tostring(totalCoins.Value)
So we now have a string variable that holds the value of totalCoins. Our next course of action is to convert that variable into something more readable.
If we're using a LocalScript, I recommend utilizing gui objects for this.
local holder = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
local textDisplay = Instance.new("TextLabel", holder)
textDisplay.Text = tostr
Wonderful! Now we have the totalCoins value correctly shown for the player to see.
At this point, the best course of action will be to ask the player very nicely to re-enter the code into a second textbox. We can do that using a few more simple guis:
local input = ""
local button = Instance.new("TextButton", holder)
button.Position = UDim2.new(0,0,0.3,0)
button.Text = "Please enter the text from the TextLabel into the TextBox then click this TextButton!"
local box = Instance.new("TextBox", holder)
box.Position = UDim2.new(0,0,0.6,0)
box.PlaceholderText = "Enter here!"
button.MouseButton1Click:Connect(function()
input = box.Text
end)
And now, finally, the final step:
print(5)
3 comments
tried print(totalCoins), printed "nil", tried print(totalCoins.Value), printed "attempt to index nil with Value"
check edit for better explanation
can i have a picture of your explorer? take a screenshot and upload it to imgbb.com and send the link here because honestly, i'm a little confused about what you say