✓ Accepted answer
Alright, so how you would get that Value and then add it to one Value and then subtract that Value from another value is quiet simple. When doing arithmetic with values you have to address the Value property of them. So you would probably do something like this...
local player = game.Players.LocalPlayer
local players = game.Players:GetChildren()
local points = Instance.new("IntValue", player)
points.Name = "Points"
points.Value = 0
local hv = Instance.new("IntValue", player)
hv.Name = "Extra"
hv.Value = 0
player.Chatted:connect(function(message)
if message == "points" then
for i, v in pairs(players) do
local playerpoints = v:WaitForChild("Points")
playerpoints.Value = (playerpoints.Value) + hv.Value
end
end
local player = game.Players.LocalPlayer
local players = game.Players:GetChildren()
local points = Instance.new("IntValue", player)
points.Name = "Points"
points.Value = 0
local hv = Instance.new("IntValue", player)
hv.Name = "Extra"
hv.Value = 0
player.Chatted:connect(function(message)
if message == "points" then
for i, v in pairs(players) do
local playerpoints = v:WaitForChild("Points")
playerpoints.Value = (playerpoints.Value) - (hv.Value)
end
end
Thank you for reading this question and I hope I helped! If you have any questions about this please don't be afraid to post them in the comments.
~~ KingLoneCat