Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script cant find the values in a part?

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)

2 comments

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)

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

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.