So this part of my script for a killstreak type ability works, but once the player dies and their hitvalue leaderstat is destroyed, when it gets readded it doesnt increase their hitvalue when they punch someone but it increases the billboard gui's text value and on top of that for some reason after they die the value on the billboard gui is saved and even though they start with 0 on their billboard, when they hit someone it gets restored to the same amount before (for example if they had 10 hitvalue before they died and then they die and use the ability again and punch someone once the billboard gui's value becomes 11 but the hitvalue doesnt go up at all and stays 0)
#Why does this happen
1 messages · Page 1 of 1 (latest)
Can't rly get your issue, but maybe u modify from client?
might be
Couldn't comprehend that, can you provide a full script?
this is the full script
and this is the script that removes the intvalues
Once the player dies, the system doesn't work anymore?
thats what effectively happens yes
only the billboard value increase
and the value in leaderstats?
doesnt increase
alright I see
I quite don't get the structure of the script but here's at least two things I have checked: usage of conditional statement or the variable isn't updated
and another case is that it could be this one, "client-sided"
no it isnt
i viewed it from server perspective
then it could be those two
maybe
yes
so there's no need to worry about client sided, but the int value
yeah well if the problem was client sided the intvalue would update
so its probably something to do with intvalue
wait lemme try something rq
where is that part that it increases hitvalue?
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if plr:FindFirstChild("HitValue") then
local HitValue = plr:FindFirstChild("HitValue")
HitValue.Value += 1
plr.Character.HumanoidRootPart.BillboardGui.TextLabel.Text += 1
humanoid:TakeDamage(12 + (HitValue.Value * 0.25))
end
it does infact print
the billboard updates according to the first instance of hitvalue whether or not it still exists or not
yeah it just goes back to the old value
quite the dilemma
i just overwrited the billboardvalue by just making it add 1 instead of equaling the hitvalue
but hitvalue is still a problem since the moveset/ability directly is linked to it
can you provide a video?
demonstration at least, I honestly don't know what I'm looking foor
so uh
this is the script before i fixed the billboard problem
before i reset my hitvalue was indeed 2
and after i reset no matter how many times i punched the hitvalue was 0
and the billboard gui kept updating according the the old nonexistent hitvalue for some reason
and yes i checked to see if the old hitvalue was getting destroyed
** You are now Level 6! **
does the hitvalue get destroyed after the player dies?
yes
maybe this is the case
what
the server sided gets the "old hitvalue"
yes the fact is that it still exists on the serverside
but of course there will be a new hitvalue, but it doesn't get that new hitvalue, still the old one
correct?
yea