Script that gets fired everytime a character is added(CharacterAdded)
game.ReplicatedStorage.RemoteEvents.characterAdded.OnServerEvent:Connect(function(player) wait(0.1) workspace:FindFirstChild(player.Name).Humanoid.MaxHealth = (player.Stats.Strength.Value*2)+(player.Stats.Vitality.Value*4)+100 end)
The script is supposed to get the current value of strength and vitality of the player, however when I reset the value stays the same with strength and vitality being 1, always giving the player 106 health each time i respawn even with the value of strength and vitality being already greater than 1
I GOT IT LOL FINALLY THE PROBLEM WAS SINCE THE LOCAL SCRIPT ONLY CHANGES THE VALUE ON THE CLIENT (it showed 10 on the client, yet 1 on the server) IT ALWAYS RETURNED 1. SO WHAT I DID WAS I PASSED THE LOCAL VALUE(CLIENT VALUE) OF STRENGTH AND VITALITY TO THE SERVER SCRIPT THEN USED THAN INSTEAD OF USING THE VALUES OF STRENGTH AND VITALITY ON THE SERVER.
Client: https://ibb.co/jQSG98 Server: https://ibb.co/gakgbo