" Vest is not a valid member of Model “Workspace.Black_Albi” "
Hmmmm Should I store the value in other location?
It’s because there isn’t a vest in your character.
I’m using a script that replace the defaukt player character with a modified one, where there is a Vest and a LVest value stored inside
Then you will have to define that another way.
Maybe server storage but it’s fpr everyone…
It have to be a local value
Oh I just realized that plr wasn’t defined
1 Like
Oh, or maybe like I can , instead of defined value, put a “Instance.new” to create a value
1 Like
Maybe add a bool value to check if it’s equipped.
It is already a bool value
– e
How can I parent it to the player character using the Player :
local x = Instance.new("BoolValue")
x.Parent = Players.Character
x.Name = "Vest"
local y = Instance.new("BoolValue")
x.Parent = Players.Character
x.Name = "LVest"
Because it says Character is not a valid part of Player
what is Players in your script?
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local click = script.Parent
local model = script.Parent.Parent
local vest = game.ReplicatedStorage.Vest
click.MouseClick:Connect(function(player)
local x = Instance.new("BoolValue")
x.Parent = player.Character
x.Name = "Vest"
local y = Instance.new("BoolValue")
y.Parent = player.Character
y.Name = "LVest"
if x == false and y == false and player.Team == Teams["DClass"] or player.Team == Teams["Scientist"] or player.Team == Teams["Guard"] or player.Team == Teams["GRUP"] or player.Team == Teams["ChaosI"] or player.Team == Teams["GOC"] or player.Team == Teams["O5"] or player.Team == Teams["UIU"] then
model:Destroy()
print("Destroyed")
local v = vest:Clone()
print("Clone")
v.Parent = player.Character
v.Name = "HeavyVest"
print("equipped")
x = true
player.Character.Humanoid.MaxHealth = player.Character.Humanoid.MaxHealth + 75
player.Character.Humanoid.Health = player.Character.Humanoid.Health + 75
print("Add health")
elseif x == false and y == true and player.Team == Teams["DClass"] or player.Team == Teams["Scientist"] or player.Team == Teams["Guard"] or player.Team == Teams["GRUP"] or player.Team == Teams["ChaosI"] or player.Team == Teams["GOC"] or player.Team == Teams["O5"] or player.Team == Teams["UIU"] then
model:Destroy()
local v = vest:Clone()
v.Parent = player.Character
v.Name = "HeavyVest"
x = true
player.Character.Humanoid.MaxHealth = player.Character.Humanoid.MaxHealth + 25
player.Character.Humanoid.Health = player.Character.Humanoid.Health + 25
end
end)
Modified the script cuz Players.Character wasn't the rght path
your prob mentioning the service “Players” instead of the actual player itself
if x == false and y == false and player.Team == Teams["DClass"] or player.Team == Teams["Scientist"] or player.Team == Teams["Guard"] or player.Team == Teams["GRUP"] or player.Team == Teams["ChaosI"] or player.Team == Teams["GOC"] or player.Team == Teams["O5"] or player.Team == Teams["UIU"] then
model:Destroy()
local v = vest:Clone()
print("Clone")
problem come from this part of the code cuz It create the value and it parent it to the roblox character