game.ReplicatedStorage.JumpPower.OnServerEvent:connect(function(plr) game.ServerStorage:FindFirstChild(plr.Name).Jump.Value = game.ServerStorage:FindFirstChild(plr.Name).Jump.Value + 1 end)
idk what the problem is becus the plr.Name works in my data script but not in this script pls help?
You're using Instance:FindFirstChild()
improperly. It will return nil
if the object with the name can't be found.
So if you do this:
game.Workspace:FindFirstChild("Part").Name = "Hi"
Your code will error, because you are attempting to access nil.Name
.
Furthermore, you should not have a RemoteEvent
that is able to increase a value that the client can just request. Because exploiters can fire remotes with any arguments they want at any time, other than the implicit player argument you can trust, you should not trust the client!
As for why your code isn't working at all, you haven't provided enough context to the situation. It could be that there's no object in game.ServerStorage
with the player's name in it when the remote is fired.