local Sword = Instance.new("StringValue",script.Parent) Sword.Value = game.Players.LocalPlayer.NameofSword.Value --------------ADD XP FUNCTION game.Players.LocalPlayer.XP.Value = game.Players.LocalPlayer.XP.Value + 40 game.Players.LocalPlayer.Character[Sword.Value].XP.Value = game.Players.LocalPlayer.Character[Sword.Value].XP.Value + 40 if(game.Players.LocalPlayer.Character[Sword.Value].XP.Value > game.Players.LocalPlayer.Character[Sword.Value].MaxXP.Value)then game.Players.LocalPlayer.Character[Sword.Value].Level.Value = game.Players.LocalPlayer.Character[Sword.Value].XP.Value + 1 game.Players.LocalPlayer.Character[Sword.Value].XP.Value = 0 game.Players.LocalPlayer.Character[Sword.Value].MaxXP.Value = game.Players.LocalPlayer.Character[Sword.Value].MaxXP.Value end game.Players.LocalPlayer.Level.Value = game.Players.LocalPlayer.Character[Sword.Value].Level.Value game.Players.LocalPlayer.XP.Value = game.Players.LocalPlayer.Character[Sword.Value].XP.Value
Problem : 22:54:45.165 - SadBlade is not a valid member of Model
Where do you define/explain what/where SadBlade is? SadBlade is basically returning nil because it is not there. You can try to use a FindFirstChild() method or the WaitForChild() event to essentially see/wait for the child to be added.