So every pet got a multiplier and if they level up the multiplier adds up in the pet. And i got a Gui that shows every pet multiplier that are equipped.
The Multiplier from the pet:
Multiplier from every pet equipped:
The pet leveled up and the multiplier changed in the pet:
But the label doesnt change if the pet leveled up its still the same:
It Should be x1.7 and not x1.6 in the pet equipped label.
Thats the add up script:
if Folder.Equipped.Value == false then
Player.PetEffect.Multi.Value += Folder.Multiplier1.Value --Your Multi + Pet Multi
if Player.PetEffect.Multi.Value < 0 then
Player.PetEffect.Multi.Value = 1
end
Can you show more of the script? There isn’t much to go on from what you have posted. Also, if you have a 0.6x multiplier, it’ll lower your money, not increase it.
function ActionRequest(Player, Action, Parameters)
if Action == "Equip" then
local Folder = GetFolderFromPetID(Player, Parameters.PetID)
if Folder ~= nil then
if Folder.Equipped.Value == false then
Player.PetEffect.Multi.Value += Folder.Multiplier1.Value --Your Multi + Pet Multi
if Player.PetEffect.Multi.Value < 0 then
Player.PetEffect.Multi.Value = 1
end
local TotalEquipped = 0
for i,v in pairs(Player.Pets:GetChildren()) do
if v.Equipped.Value == true then
TotalEquipped = TotalEquipped + 1
end
end
if TotalEquipped < Player.Data.MaxEquip.Value then
Folder.Equipped.Value = true
loadEquipped(Player)
return "Success"
else
Player.PetEffect.Multi.Value -= Folder.Multiplier1.Value --Your Multi + Pet Multi
if Player.PetEffect.Multi.Value < 0 then
Player.PetEffect.Multi.Value = 1
end
return "Error", v1:NotifyPlayer(Player, "Cant't Equip more Pets")
end
else
return "Error", v1:NotifyPlayer(Player, "Pet already Equipped")
end
else
return "Error", v1:NotifyPlayer(Player, "Invalid Pet")
end
Correct me if I am wrong, but it seems like your first script might be a server script and your script changing the text is a LocalScript, which could explain the problem, if this isn’t the case, and you have a proper way of communicating between the server and client, can you show how?
i didnt even script the part where it should change the value. Thats why i am asking how to do it. I think it doesnt even matter if its local script bc its just showing the text to the local player.
I want that the currently pet multiplier adds to the currently equipped multiplier. If the pet multiplier is currently x0.6 and when i equip the pet, the equip multiplier is also x0.6. Thats fine.
But when the pet levels up as it is equipped his multiplier increases, but my currently equipped multiplier isnst increasing.
So what even is your issue? You want to know how to make a multiplier change with levels for the pets and don’t have a script? Because that’s not what the thread initially says.
I posted the add up script and not the changed signal script. I just need to know, how can i do a GetPropertyChangedSignal in my script or changed function.
I still don’t get what you are trying to do. You want to do a Change function or a GetPropertyChangedSignal for what value? What are you trying to do when the value changes?