idk how do i check my output???
Output, like explorer and properties, is a window that you can toggle in Studio in the View panel.
It is where errors/warnings/prints from scripts are reported during runtime when you play test your game.
I’d like a quick recap before attempting to find a solution for you, where are you currently at in terms of bug fixing this script? Have you fixed the punch, or if not, are there any errors accompanying it?
I’ve been busy the past half hour sorry, and I’m just reopening Studio. The punch works, it just doesnt add stats to the leaderboard.
Is any error message received in the output regarding the punch script (or regarding the leaderstats at all) that you feel could be causing this?
idk how to output… and roblox studio wasnt responding, I have to open it again. How do you output errors?
At the top of the studio window, you’ll see this little selection UI, it looks something like this
Click on “View” which will open up a menu in place of the “Home” tab, or whatever other tab you have open at the time, the tab will look something like this:
From there, all you have to do is click on “Output”, and the output ui will open, usually it’s at the bottom of the screen however it could open else where.
all mine says is
23:58:57.187 - DataModel Loading https://assetdelivery.roblox.com/v1/asset/?id=3518850323
I notice this line in your code and I am not sure if this has already been addressed, however:
Exp.Changed:connect(function() ExpChange(Player,Exp,Level)
You are trying to call the function “ExpChange” with 2 nil values, “Exp” itself being a nil value. I’d say this is one of the main culprits behind your strength not changing.
This is what comes out when i punch
Line 3
00:06:34.876 - Stack End
00:10:24.890 - level is not a valid member of Folder
00:10:24.901 - Stack Begin
00:10:24.903 - Script ‘ServerScriptService.strengthgiver’, Line 3
00:10:24.907 - Stack End
You’ve named your “level” value “Level” in the folder itself, capitalization does matter when trying to identify an instance of any kind. Replace the (what I am assuming is) leaderstats.level
to leaderstats.Level
and that should fix that error.
This is how it is
Level.Name = "Level"
Do I change that to
Level.Name = "level"
Well you can either change that to “level”, or in the punch script itself, you can change the “level” to “Level” with a capital L.
Ohhh. it was level not Level in the strength giver… lol imma try running it now.
It sort of worked? I punched and it set my stats to 0 and did not change? Idk…
Without the rest of the strength script, I can’t do much. Can you paste the entire punch script here so I can see what the issue is?
Solution was reached via private messaging
Solution
The issue was a mistake in OP’s code where-as he designated the default “Level” value to 0, and then attempted multiplying the strength value by the level number. Another issue came when he changed the default values and forgot to reset his datastore’s in order to have the changes publish to his own data.