game.Players.PlayerAdded:Connect(function(plr)
game.ReplicatedStorage.StatSystem.AddingStats.AddingMelee.OnServerEvent:Connect(function(plr)
print("Yes")
local PointsAvailable = plr.Stats.PointsAvailable
local PointsUsed = plr.Stats.PointsUsed
local Melee = plr.Stats.Melee
if PointsAvailable.Value >= PointsUsed.Value then
print("Points is more")
Melee.Value = Melee.Value + PointsUsed.Value
PointsAvailable.Value = PointsAvailable.Value - PointsUsed.Value
print("Melee Up Normal")
else
print("Points is less")
Melee.Value = Melee.Value + PointsAvailable.Value
PointsAvailable.Value = PointsAvailable.Value - PointsAvailable.Value
print("Points up all")
end
end)
end)
#Values arent changing correctly
97 messages · Page 1 of 1 (latest)
Global consequence moment
All players are affected by one player's action
Oh, mobile moment. You're safe for now
Thats not even the issue im having, but good to know
It was very close.
I see
Get rid of that goofy Players.PlayerAdded handler
That's the offender, lol
You're still suffering from a memory leak
A what?
A memory leak is when a program fails to release the memory it no longer needs
You've technically got memory bloat, too
Two for two, lol
Well what am i supposed to do?
Because im confused
Rn its doing nothing at all
besides print "Points is more" and "melee up normal" No matter what pointsused is
This is the root cause of all those problems
I removed that and nothing happened
It is not the root cause of this problem, lol
I see
That's probably because you're manipulating those values locally
Then how do i fix both problems?
Don't do this
Idk how to do thta
I diddd
The server must dictate the available points and track the points used
None of those values can be changed in a LocalScript
This isnt a local script
Those changes will fail to replicate due to the replication boundary
Again, not a localscript
Where did I say I was talking about this code, lmfao
Ah
The system(s) you have to progress those values is what I'm referring to
I dont understand any of it
Break it down; research what you don't understand in that article until you can work back up to it
The client-server model is a fundamental component of multiplayer games
You must understand this model in order to develop on Roblox
The problem is caused by your lack of understanding in the client-server model
You don't seem to understand the replication boundary, and the roles of Scripts and LocalScripts
Idk what that even is
Bob's your uncle
About?
just all ofi t
Discord: https://discord.gg/bEn49K5JUt
Patreon: https://www.patreon.com/Suphi
Donate: https://www.roblox.com/games/7532473490
Documentation: https://create.roblox.com/docs/scripting/networking/client-server-model
0:00:00 - Intro
0:00:09 - Text File Replication
0:02:04 - Studio Replication
0:19:21 - Outro
Here's a video to dumb things down
I still dont get it
You didn't finish the video 👁️👄👁️
I did
I dont get it tho
Can u help me fix it tho? Cuz i learn more by doing then by being taught
You're not that smart, are you...
No not very
?
I watched all of it
By skimming yes, because as I said, I dont learn by being taught
I learn by doing it
Cope. Watch the whole video
No
Then you're on your own, lmfao
Ok then
Your useless
Get out of here
Get
Just leave
go
Stop following it
Goodbye
Xd*
im useless