Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script cant find the values in a part?

Asked by 3 years ago

Im really confused can someone help me. So I have the value HitRate inside of the big weapon and its in the correct capitals and everythings I copied the text into the script and it still gives me this error. HitRate is not a valid member of Part "Players.epicnmac.Inventory.Big Weapon"

This is the local script:

local player = game.Players.LocalPlayer
local inventory = player.Inventory
player.Inventory.ChildAdded:Connect(function(addedweapon)
for _,child in pairs(inventory:GetChildren()) do
        local weaponframe = script.Parent.Parent.Frame:Clone()
        weaponframe.Parent = script.Parent
        weaponframe.WeaponName.Value = addedweapon.Name
        weaponframe.HitRate.Value = addedweapon.HitRate
        weaponframe.Damage.Value = addedweapon.Damage
        weaponframe.CritChance.Value = addedweapon.CritChance
        weaponframe.Health.Value = addedweapon.Health
end
    inventory.ChildAdded:Connect(function(child)

end)
    inventory.ChildRemoved:Connect(function(child)

    end)
    end)
0
are you even adding the values? (btw i dont recommend this method since exploiters can just change it if it dosent has a serverside check) rafa_br34 5 — 3y
0
im not adding the values im just setting one value to the value of another one second of all how can I have a serverside check to make sure nobody changes the values epicnmac 63 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Ok so I found a solution by pasting the object into the folder the script for some reason does not recongnize it but when I move it into there it does? In my opinion its stupid and I think we need to report this bug to roblox.

Ad

Answer this question