So i want for example change the value from the module sscript on the chicken to false but i want to change the value in the server script.
Heres my scripts. Module
local Animals = { ["Chicken"]= { ["Tameable"]= true, ["Health"]= 25, } } return Animals
Server Script
local h = require(game.ReplicatedStorage.Animals.ObjectStats) print(h.Animals["Chicken"][2],false)
Error:
1:32:39.479 - ServerScriptService.Script:2: attempt to index field 'Animals' (a nil value) 17:32:39.480 - Stack Begin 17:32:39.480 - Script 'ServerScriptService.Script', Line 2 17:32:39.481 - Stack End
You are indexing a value that does not exist, h is equal to the Animals table in the module script since you used return. So the correct way to index chicken would be,
local h = require(game.ReplicatedStorage.Animals.ObjectStats) print(h.Chicken.Tameable)