Hello, i'm new to scripting. So I added an IntValue inside game.Player.LocalPlayer, how do I change it from 0 to 1? If you need the code i will send it
COMMUNITY QUESTION
If you add a IntValue inside LocalPlayer, how do you change it in another script?
1 answer
Depends on your situation. If this value is only needed to be seen by you, The client , you can just change it like this:
Players = game:GetService("Players") -- The players service
Player = Players.LocalPlayer -- Your local player
IntValue = Player:WaitForChild(-YOUR VALUE'S NAME-) -- Waits for your value to be added
IntValue.Value = 1 -- Changes it to 1
print("Your value is"..IntValue.Value") -- Prints it's value
If you want to change it for everyone however, The server , you might want to understand how to use RemoveEvents or PlayerAdded, since The server can't distinct which player you are ( unless you parent the script to your player ).
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Always assume that we need the code
Since you're using LocalPlayer it has to be a LocalScript. And everything made from a LocalScript will only affect that specific player. If you add something with a LocalScript, the Server won't be able to see it and therefore you can not change it from a Server Script or a LocalScript associated with another player