Have problem with script

I wanted to make that script gives player a tool if he doesn’t have string value, but it doesn’t work.

---
game.Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(message)
		if message == mess and player.Character:WaitForChild("Humanoid").TransformInfo.Value == "Mia" then
			---
			if humanoid.CharInfo and not humanoid.TransformInfo then
				game.Workspace["Mia Tool"].Parent = player.Backpack
			end
			
			humanoid.WalkSpeed = 16
			humanoid.JumpHeight = 7.2		
			char.HumanoidRootPart.Anchored = false
			
		end
	end)
end)

1 Like
if humanoid.CharInfo and humanoid.TransformInfo.Value == "" then

end

Whenever you want to check if they have a specific string value use either == or ~= then the string. If there is no string listed it is just a string with no words.

I put there and not because while function is commiting then it deletes and it should check it

Is it even if I delete it by using script???

if you delete the humanoid.TransformInfo then it’d look something like this

if humanoid.CharInfo and not humanoid:FindFirstChild("TransformInfo") then

end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.